Sha256: c048c324ac84c9d4a70e3cd72e1fb188c300f486adf5f1e5953f8ef9ba1f684e
Contents?: true
Size: 1 KB
Versions: 134
Compression:
Stored size: 1 KB
Contents
<?php require "collatz-conjecture.php"; class CollatzConjecture extends PHPUnit\Framework\TestCase { public function testZeroStepsForOne() { $this->assertEquals(0, steps(1)); } public function testDivideIfEven() { $this->markTestSkipped(); $this->assertEquals(4, steps(16)); } public function testEvenAndOddSteps() { $this->markTestSkipped(); $this->assertEquals(9, steps(12)); } public function testLargeNumberOfEvenAndOddSteps() { $this->markTestSkipped(); $this->assertEquals(152, steps(1000000)); } public function testZeroIsAnError() { $this->markTestSkipped(); $this->expectException('InvalidArgumentException', 'Only positive numbers are allowed'); steps(0); } public function testNegativeValueIsAnError() { $this->markTestSkipped(); $this->expectException('InvalidArgumentException', 'Only positive numbers are allowed'); steps(-1); } }
Version data entries
134 entries across 134 versions & 1 rubygems