Skip to content

Commit 15f343d

Browse files
committed
Simplify no_longer_supports_hacklang_variant() test
1 parent c0a0b71 commit 15f343d

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

src/test/php/lang/ast/unittest/emit/LambdasTest.class.php

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -178,17 +178,12 @@ public function run() {
178178
Assert::equals(2, $r());
179179
}
180180

181-
#[Test]
181+
#[Test, Expect(Errors::class)]
182182
public function no_longer_supports_hacklang_variant() {
183-
try {
184-
$this->run('class <T> {
185-
public function run() {
186-
$func= ($arg) ==> { return 1; };
187-
}
188-
}');
189-
$this->fail('No errors raised', null, Errors::class);
190-
} catch (Errors $expected) {
191-
\xp::gc();
192-
}
183+
$this->run('class <T> {
184+
public function run() {
185+
$func= ($arg) ==> { return 1; };
186+
}
187+
}');
193188
}
194189
}

0 commit comments

Comments
 (0)