File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ require_once (__DIR__ .'/../../bootstrap/unit.php ' );
4+
5+ $ t = new lime_test (23 );
6+
7+ $ t ->comment ('A. Equal numbers ' );
8+ $ t ->is (1 , 1 );
9+ $ t ->is (2 , 2 );
10+ $ t ->is (-100 , -100 );
11+ $ t ->is (0 , 0 );
12+
13+ $ t ->comment ('B. Equal strings ' );
14+ $ t ->is ('' , '' );
15+ $ t ->is ('A ' , 'A ' );
16+ $ t ->is ('aaa ' , 'aaa ' );
17+ $ t ->is ("\0" , "\0" );
18+
19+ $ t ->comment ('C. Equivalent number <-> strings ' );
20+ $ t ->is ('0 ' , 0 );
21+ $ t ->is ('1 ' , 1 );
22+ $ t ->is ('-1 ' , -1 );
23+ $ t ->is ('10000000.0 ' , 10000000.0 );
24+
25+ $ t ->comment ('D. Not equal numbers ' );
26+ $ t ->isnt (10 , 1 );
27+ $ t ->isnt (-2 , 2 );
28+ $ t ->isnt (100 , 100.1 );
29+ $ t ->isnt (0 , -1 );
30+ $ t ->isnt (-2 , 'Hello ' );
31+ $ t ->isnt (100 , array (100 ));
32+
33+ $ t ->comment ('E. Equivalent falsy ' );
34+ $ t ->is (0 , false );
35+ $ t ->is (0 , null );
36+ $ t ->is ('' , 0 );
37+ $ t ->is (false , null );
38+ $ t ->is (array (), null );
You can’t perform that action at this time.
0 commit comments