Sha256: 4e3e6d9e3ad0164c4dec03ad967245526392518e1a5e45fbb076290690288143
Contents?: true
Size: 1.45 KB
Versions: 96
Compression:
Stored size: 1.45 KB
Contents
<?php require "hamming.php"; class HammingComparatorTest extends PHPUnit_Framework_TestCase { public function testNoDifferenceBetweenIdenticalStrands() { $this->assertEquals(0, distance('A', 'A')); } public function testCompleteHammingDistanceOfForSingleNucleotideStrand() { $this->markTestSkipped(); $this->assertEquals(1, distance('A', 'G')); } public function testCompleteHammingDistanceForSmallStrand() { $this->markTestSkipped(); $this->assertEquals(2, distance('AG', 'CT')); } public function testSmallHammingDistance() { $this->markTestSkipped(); $this->assertEquals(1, distance('AT', 'CT')); } public function testSmallHammingDistanceInLongerStrand() { $this->markTestSkipped(); $this->assertEquals(1, distance('GGACG', 'GGTCG')); } public function testLargeHammingDistance() { $this->markTestSkipped(); $this->assertEquals(4, distance('GATACA', 'GCATAA')); } public function testHammingDistanceInVeryLongStrand() { $this->markTestSkipped(); $this->assertEquals(9, distance('GGACGGATTCTG', 'AGGACGGATTCT')); } public function testExceptionThrownWhenStrandsAreDifferentLength() { $this->markTestSkipped(); $this->setExpectedException('InvalidArgumentException', 'DNA strands must be of equal length.'); distance('GGACG', 'AGGACGTGG'); } }
Version data entries
96 entries across 96 versions & 1 rubygems