1
1
<?php namespace lang \ast \syntax \php \unittest ;
2
2
3
3
use lang \ast \unittest \emit \EmittingTest ;
4
- use unittest \Assert ;
4
+ use unittest \{ Assert , Test } ;
5
5
6
6
class IsOperatorTest extends EmittingTest {
7
7
8
- #[@test ]
8
+ #[Test ]
9
9
public function this_is_self () {
10
10
$ r = $ this ->run ('class <T> {
11
11
public function run() {
@@ -16,7 +16,7 @@ public function run() {
16
16
Assert::true ($ r );
17
17
}
18
18
19
- #[@test ]
19
+ #[Test ]
20
20
public function new_self_is_static () {
21
21
$ r = $ this ->run ('class <T> {
22
22
public function run() {
@@ -27,7 +27,7 @@ public function run() {
27
27
Assert::true ($ r );
28
28
}
29
29
30
- #[@test ]
30
+ #[Test ]
31
31
public function is_qualified_type () {
32
32
$ r = $ this ->run ('class <T> {
33
33
public function run() {
@@ -38,7 +38,7 @@ public function run() {
38
38
Assert::true ($ r );
39
39
}
40
40
41
- #[@test ]
41
+ #[Test ]
42
42
public function is_imported_type () {
43
43
$ r = $ this ->run ('use util\Date; class <T> {
44
44
public function run() {
@@ -49,7 +49,7 @@ public function run() {
49
49
Assert::true ($ r );
50
50
}
51
51
52
- #[@test ]
52
+ #[Test ]
53
53
public function is_aliased_type () {
54
54
$ r = $ this ->run ('use util\Date as D; class <T> {
55
55
public function run() {
@@ -60,7 +60,7 @@ public function run() {
60
60
Assert::true ($ r );
61
61
}
62
62
63
- #[@test ]
63
+ #[Test ]
64
64
public function is_type_variable () {
65
65
$ r = $ this ->run ('class <T> {
66
66
public function run() {
@@ -72,7 +72,7 @@ public function run() {
72
72
Assert::true ($ r );
73
73
}
74
74
75
- #[@test ]
75
+ #[Test ]
76
76
public function is_primitive_type () {
77
77
$ r = $ this ->run ('class <T> {
78
78
public function run() {
@@ -83,7 +83,7 @@ public function run() {
83
83
Assert::equals ([true , true , true , true , true ], $ r );
84
84
}
85
85
86
- #[@test ]
86
+ #[Test ]
87
87
public function is_nullable_type () {
88
88
$ r = $ this ->run ('class <T> {
89
89
public function run() {
@@ -94,7 +94,7 @@ public function run() {
94
94
Assert::equals ([true , true , true ], $ r );
95
95
}
96
96
97
- #[@test ]
97
+ #[Test ]
98
98
public function is_array_pseudo_type () {
99
99
$ r = $ this ->run ('class <T> {
100
100
public function run() {
@@ -105,7 +105,7 @@ public function run() {
105
105
Assert::equals ([true , true , true , false ], $ r );
106
106
}
107
107
108
- #[@test ]
108
+ #[Test ]
109
109
public function is_object_pseudo_type () {
110
110
$ r = $ this ->run ('class <T> {
111
111
public function run() {
@@ -116,7 +116,7 @@ public function run() {
116
116
Assert::equals ([true , true , false ], $ r );
117
117
}
118
118
119
- #[@test ]
119
+ #[Test ]
120
120
public function is_callable_pseudo_type () {
121
121
$ r = $ this ->run ('class <T> {
122
122
public function run() {
@@ -127,7 +127,7 @@ public function run() {
127
127
Assert::equals ([true , true , false ], $ r );
128
128
}
129
129
130
- #[@test ]
130
+ #[Test ]
131
131
public function is_native_iterable_type () {
132
132
$ r = $ this ->run ('class <T> implements \IteratorAggregate {
133
133
public function getIterator() {
@@ -142,7 +142,7 @@ public function run() {
142
142
Assert::equals ([true , true , false ], $ r );
143
143
}
144
144
145
- #[@test ]
145
+ #[Test ]
146
146
public function is_map_type () {
147
147
$ r = $ this ->run ('class <T> {
148
148
public function run() {
@@ -153,7 +153,7 @@ public function run() {
153
153
Assert::equals ([true , false ], $ r );
154
154
}
155
155
156
- #[@test ]
156
+ #[Test ]
157
157
public function is_array_type () {
158
158
$ r = $ this ->run ('class <T> {
159
159
public function run() {
@@ -164,7 +164,7 @@ public function run() {
164
164
Assert::equals ([true , false , false ], $ r );
165
165
}
166
166
167
- #[@test ]
167
+ #[Test ]
168
168
public function is_union_type () {
169
169
$ r = $ this ->run ('class <T> {
170
170
public function run() {
@@ -175,7 +175,7 @@ public function run() {
175
175
Assert::equals ([true , true , false ], $ r );
176
176
}
177
177
178
- #[@test ]
178
+ #[Test ]
179
179
public function is_function_type () {
180
180
$ r = $ this ->run ('class <T> {
181
181
public function run() {
@@ -186,7 +186,7 @@ public function run() {
186
186
Assert::equals ([true , false ], $ r );
187
187
}
188
188
189
- #[@test ]
189
+ #[Test ]
190
190
public function precedence () {
191
191
$ r = $ this ->run ('class <T> {
192
192
public function run() {
0 commit comments