44use lang \Runnable ;
55use lang \ast \Errors ;
66use lang \ast \unittest \emit \EmittingTest ;
7+ use unittest \Assert ;
78
89class SwitchExpressionTest extends EmittingTest {
910
@@ -32,35 +33,35 @@ public function run($arg) {
3233 # [null, 'void'],
3334 #])]
3435 public function exact_comparison ($ arg , $ expected ) {
35- $ this -> assertEquals ($ expected , $ this ->typeFixture ()->newInstance ()->run ($ arg ));
36+ Assert:: equals ($ expected , $ this ->typeFixture ()->newInstance ()->run ($ arg ));
3637 }
3738
3839 #[@test, @values([
3940 # [1, 'integer'],
4041 # ['Test', 'string'],
4142 #])]
4243 public function native_type_comparison ($ arg , $ expected ) {
43- $ this -> assertEquals ($ expected , $ this ->typeFixture ()->newInstance ()->run ($ arg ));
44+ Assert:: equals ($ expected , $ this ->typeFixture ()->newInstance ()->run ($ arg ));
4445 }
4546
4647 #[@test, @values([
4748 # [[1], 'integers'],
4849 # [['Test'], 'strings'],
4950 #])]
5051 public function array_type_comparison ($ arg , $ expected ) {
51- $ this -> assertEquals ($ expected , $ this ->typeFixture ()->newInstance ()->run ($ arg ));
52+ Assert:: equals ($ expected , $ this ->typeFixture ()->newInstance ()->run ($ arg ));
5253 }
5354
5455 #[@test]
5556 public function value_type_comparison() {
56- $ this -> assertEquals ('runnable-instance ' , $ this ->typeFixture ()->newInstance ()->run (newinstance (Runnable::class, [], [
57+ Assert:: equals ('runnable-instance ' , $ this ->typeFixture ()->newInstance ()->run (newinstance (Runnable::class, [], [
5758 'run ' => function () { }
5859 ])));
5960 }
6061
6162 #[@test]
6263 public function function_type_comparison() {
63- $ this -> assertEquals ('runnable-function ' , $ this ->typeFixture ()->newInstance ()->run (function (Runnable $ a ) { }));
64+ Assert:: equals ('runnable-function ' , $ this ->typeFixture ()->newInstance ()->run (function (Runnable $ a ) { }));
6465 }
6566
6667 #[@test, @expect (IllegalArgumentException::class)]
@@ -99,6 +100,6 @@ public function run() {
99100 };
100101 }
101102 } ' );
102- $ this -> assertEquals (2 , $ r );
103+ Assert:: equals (2 , $ r );
103104 }
104105}
0 commit comments