Created
April 2, 2012 04:32
-
-
Save indare/2280760 to your computer and use it in GitHub Desktop.
phpの闇
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'PHPUnit/Autoload.php'; | |
class testBoolCheck extends PHPUnit_Framework_TestCase { | |
public function testBoolCheck_1(){ | |
$this->assertEquals(is_bool(-1),false); | |
} | |
public function testBoolCheck_2(){ | |
$this->assertEquals(is_bool(0),false); | |
} | |
public function testBoolCheck_3(){ | |
$this->assertEquals(is_bool((bool)(-1)),true); | |
} | |
public function testBoolCheck_4(){ | |
$this->assertEquals(is_bool((bool)(0)),true); | |
} | |
public function testBoolCheck_5(){ | |
$this->assertEquals(0,false); | |
} | |
public function testBoolCheck_6(){ | |
$this->assertEquals(0.0,false); | |
} | |
public function testBoolCheck_7(){ | |
$this->assertEquals(-1,true); | |
} | |
public function testBoolCheck_8(){ | |
$this->assertEquals(1,true); | |
} | |
public function testBoolCheck_9(){ | |
$this->assertEquals(2,true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment