$actual->isntSame($expected); // @Test: isntSame() throws no exception when comparing arrays with scalars (2) // fixtures $actual = new LimeTesterScalar(false); $expected = new LimeTesterArray(array()); // test $actual->isntSame($expected); // @Test: isntSame() throws no exception when comparing arrays with objects (1) // fixtures $actual = new LimeTesterArray(array()); $expected = new LimeTesterObject(new stdClass()); // test $actual->isntSame($expected); // @Test: isntSame() throws no exception when comparing arrays with objects (2) // fixtures $actual = new LimeTesterObject(new stdClass()); $expected = new LimeTesterArray(array()); // test $actual->isntSame($expected); // @Test: isntSame() throws no exception when comparing doubles with strings (1) // fixtures $actual = new LimeTesterDouble(1.0); $expected = new LimeTesterString('1.0'); // test $actual->isntSame($expected); // @Test: isntSame() throws no exception when comparing doubles with strings (2) // fixtures $actual = new LimeTesterString('1.0'); $expected = new LimeTesterDouble(1.0); // test $actual->isntSame($expected);
LimeAnnotationSupport::enable(); $t = new LimeTest(); // @Test: __toString() returns the value as float $actual = new LimeTesterDouble(1); $t->ok($actual->__toString() === '1.0', 'The value is correct'); // @Test: is() throws no exception if the difference between the doubles is very small // fixtures $actual = new LimeTesterDouble(1 / 3); $expected = new LimeTesterDouble(1 - 2 / 3); // test $actual->is($expected); // @Test: is() throws no exception if the the two values are infinite // fixtures $actual = new LimeTesterDouble(log(0)); $expected = new LimeTesterDouble(log(0)); // test $actual->is($expected); // @Test: isnt() throws an exception if the difference between the doubles is very small // fixtures $actual = new LimeTesterDouble(1 / 3); $expected = new LimeTesterDouble(1 - 2 / 3); // test $t->expect('LimeAssertionFailedException'); $actual->isnt($expected); // @Test: isnt() throws an exception if the the two values are infinite // fixtures $actual = new LimeTesterDouble(log(0)); $expected = new LimeTesterDouble(log(0)); // test $t->expect('LimeAssertionFailedException'); $actual->isnt($expected);