Sha256: 10493b870fc3f80f391b62594c3152718a562ee516061ce1829c2eb5f8692ad1

Contents?: true

Size: 1.29 KB

Versions: 114

Compression:

Stored size: 1.29 KB

Contents

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

class HammingTest {
    

    @Test
    fun noDifferenceBetweenIdenticalStrands() {
        assertEquals(0, Hamming.compute("A", "A"))
    }

    @Ignore
    @Test
    fun completeHammingDistanceOfForSingleNucleotideStrand() {
        assertEquals(1, Hamming.compute("A", "G"))
    }

    @Ignore
    @Test
    fun completeHammingDistanceForSmallStrand() {
        assertEquals(2, Hamming.compute("AG", "CT"))
    }

    @Ignore
    @Test
    fun smallHammingDistance() {
        assertEquals(1, Hamming.compute("AT", "CT"))
    }

    @Ignore
    @Test
    fun smallHammingDistanceInLongerStrand() {
        assertEquals(1, Hamming.compute("GGACG", "GGTCG"))
    }

    @Ignore
    @Test(expected = IllegalArgumentException::class)
    fun validatesFirstStrandNotLonger() {
        Hamming.compute("AAAG", "AAA")
    }

    @Ignore
    @Test(expected = IllegalArgumentException::class)
    fun validatesOtherStrandNotLonger() {
        Hamming.compute("AAA", "AAAG")
    }

    @Ignore
    @Test
    fun largeHammingDistance() {
        assertEquals(4, Hamming.compute("GATACA", "GCATAA"))
    }

    @Ignore
    @Test
    fun hammingDistanceInVeryLongStrand() {
        assertEquals(9, Hamming.compute("GGACGGATTCTG", "AGGACGGATTCT"))
    }

}

Version data entries

114 entries across 114 versions & 1 rubygems

Version Path
trackler-2.1.0.48 tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt
trackler-2.1.0.47 tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt
trackler-2.1.0.46 tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt
trackler-2.1.0.45 tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt
trackler-2.1.0.44 tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt
trackler-2.1.0.43 tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt
trackler-2.1.0.42 tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt
trackler-2.1.0.41 tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt
trackler-2.1.0.40 tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt
trackler-2.1.0.39 tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt
trackler-2.1.0.38 tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt
trackler-2.1.0.37 tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt
trackler-2.1.0.36 tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt
trackler-2.1.0.34 tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt
trackler-2.1.0.33 tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt
trackler-2.1.0.32 tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt
trackler-2.1.0.31 tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt
trackler-2.1.0.30 tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt
trackler-2.1.0.29 tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt
trackler-2.1.0.28 tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt