Sha256: 98c854b6a04db281fd620101c8eb85356651b448187960e765f99aa46ffe5879

Contents?: true

Size: 1.85 KB

Versions: 92

Compression:

Stored size: 1.85 KB

Contents

import org.junit.Ignore
import org.junit.Test
import kotlin.test.assertEquals

class SumOfMultiplesTest {

    @Test
    fun `multiples of 3 or 5 up to 1`() {
        assertEquals(0, SumOfMultiples.sum(setOf(3, 5), 1))
    }

    @Test
    @Ignore
    fun `multiples of 3 or 5 up to 4`() {
        assertEquals(3, SumOfMultiples.sum(setOf(3, 5), 4))
    }

    @Test
    @Ignore
    fun `multiples of 3 or 5 up to 10`() {
        assertEquals(23, SumOfMultiples.sum(setOf(3, 5), 10))
    }

    @Test
    @Ignore
    fun `multiples of 3 or 5 up to 20`() {
        assertEquals(78, SumOfMultiples.sum(setOf(3, 5), 20))
    }

    @Test
    @Ignore
    fun `multiples of 3 or 5 up to 100`() {
        assertEquals(2318, SumOfMultiples.sum(setOf(3, 5), 100))
    }

    @Test
    @Ignore
    fun `multiples of 3 or 5 up to 1000`() {
        assertEquals(233_168, SumOfMultiples.sum(setOf(3, 5), 1000))
    }

    @Test
    @Ignore
    fun `multiples of 7, 13 or 17 up to 20`() {
        assertEquals(51, SumOfMultiples.sum(setOf(7, 13, 17), 20))
    }

    @Test
    @Ignore
    fun `multiples of 4 or 6 up to 15`() {
        assertEquals(30, SumOfMultiples.sum(setOf(4, 6), 15))
    }

    @Test
    @Ignore
    fun `multiples of 5, 6 or 8 up to 150`() {
        assertEquals(4419, SumOfMultiples.sum(setOf(5, 6, 8), 150))
    }

    @Test
    @Ignore
    fun `multiples of 5 or 25 up to 51`() {
        assertEquals(275, SumOfMultiples.sum(setOf(5, 25), 51))
    }

    @Test
    @Ignore
    fun `multiples of 43 or 47 up to 10000`() {
        assertEquals(2_203_160, SumOfMultiples.sum(setOf(43, 47), 10_000))
    }

    @Test
    @Ignore
    fun `multiples of 1 up to 100`() {
        assertEquals(4950, SumOfMultiples.sum(setOf(1), 100))
    }

    @Test
    @Ignore
    fun `multiples of an empty set up to 10000`() {
        assertEquals(0, SumOfMultiples.sum(emptySet(), 10_000))
    }

}

Version data entries

92 entries across 92 versions & 1 rubygems

Version Path
trackler-2.2.1.12 tracks/kotlin/exercises/sum-of-multiples/src/test/kotlin/SumOfMultiplesTest.kt
trackler-2.2.1.11 tracks/kotlin/exercises/sum-of-multiples/src/test/kotlin/SumOfMultiplesTest.kt
trackler-2.2.1.10 tracks/kotlin/exercises/sum-of-multiples/src/test/kotlin/SumOfMultiplesTest.kt
trackler-2.2.1.9 tracks/kotlin/exercises/sum-of-multiples/src/test/kotlin/SumOfMultiplesTest.kt
trackler-2.2.1.8 tracks/kotlin/exercises/sum-of-multiples/src/test/kotlin/SumOfMultiplesTest.kt
trackler-2.2.1.7 tracks/kotlin/exercises/sum-of-multiples/src/test/kotlin/SumOfMultiplesTest.kt
trackler-2.2.1.6 tracks/kotlin/exercises/sum-of-multiples/src/test/kotlin/SumOfMultiplesTest.kt
trackler-2.2.1.5 tracks/kotlin/exercises/sum-of-multiples/src/test/kotlin/SumOfMultiplesTest.kt
trackler-2.2.1.4 tracks/kotlin/exercises/sum-of-multiples/src/test/kotlin/SumOfMultiplesTest.kt
trackler-2.2.1.3 tracks/kotlin/exercises/sum-of-multiples/src/test/kotlin/SumOfMultiplesTest.kt
trackler-2.2.1.2 tracks/kotlin/exercises/sum-of-multiples/src/test/kotlin/SumOfMultiplesTest.kt
trackler-2.2.1.1 tracks/kotlin/exercises/sum-of-multiples/src/test/kotlin/SumOfMultiplesTest.kt
trackler-2.2.1.0 tracks/kotlin/exercises/sum-of-multiples/src/test/kotlin/SumOfMultiplesTest.kt
trackler-2.2.0.6 tracks/kotlin/exercises/sum-of-multiples/src/test/kotlin/SumOfMultiplesTest.kt
trackler-2.2.0.5 tracks/kotlin/exercises/sum-of-multiples/src/test/kotlin/SumOfMultiplesTest.kt
trackler-2.2.0.4 tracks/kotlin/exercises/sum-of-multiples/src/test/kotlin/SumOfMultiplesTest.kt
trackler-2.2.0.3 tracks/kotlin/exercises/sum-of-multiples/src/test/kotlin/SumOfMultiplesTest.kt
trackler-2.2.0.2 tracks/kotlin/exercises/sum-of-multiples/src/test/kotlin/SumOfMultiplesTest.kt
trackler-2.2.0.1 tracks/kotlin/exercises/sum-of-multiples/src/test/kotlin/SumOfMultiplesTest.kt
trackler-2.2.0.0 tracks/kotlin/exercises/sum-of-multiples/src/test/kotlin/SumOfMultiplesTest.kt