Sha256: 6709c5de8a3f8c63a30a0a59999e6584f4553a26b777228f8e8dc15c0fb40f40
Contents?: true
Size: 1.15 KB
Versions: 115
Compression:
Stored size: 1.15 KB
Contents
import org.scalatest._ class HammingTest extends FlatSpec with Matchers { it should "detect no difference between empty strands" in { Hamming.compute("", "") should be (Some(0)) } it should "detect no difference between identical strands" in { pending Hamming.compute("GGACTGA", "GGACTGA") should be (Some(0)) } it should "detect complete hamming distance in small strand" in { pending Hamming.compute("ACT", "GGA") should be (Some(3)) } it should "give hamming distance in off by one strand" in { pending Hamming.compute("GGACGGATTCTG", "AGGACGGATTCT") should be (Some(9)) } it should "give small hamming distance in middle somewhere" in { pending Hamming.compute("GGACG", "GGTCG") should be (Some(1)) } it should "give a larger distance" in { pending Hamming.compute("ACCAGGG", "ACTATGG") should be (Some(2)) } it should "be undefined for first String longer" in { pending Hamming.compute("AGGCTAGCGGTAGGAC", "AAACTAGGGG") should be (None) } it should "be undefined for second String longer" in { pending Hamming.compute("AAACTAGGGG", "AGGCTAGCGGTAGGAC") should be (None) } }
Version data entries
115 entries across 115 versions & 1 rubygems