Skip to content

Commit 9868a57

Browse files
committed
Ignore tests for void and variadics with type
See facebook/hhvm#7740 and facebook/hhvm#6954
1 parent 30b934a commit 9868a57

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/test/php/net/xp_framework/unittest/core/TypeOfTest.class.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
use lang\{Primitive, Type, XPClass, ArrayType, MapType, FunctionType};
44
use unittest\actions\RuntimeVersion;
5+
use net\xp_framework\unittest\IgnoredOnHHVM;
56

67
/**
78
* Tests typeof() functionality
@@ -63,7 +64,7 @@ public function function_with_normal_and_var_arg() {
6364
$this->assertEquals(FunctionType::forName('function(lang.Type): var'), typeof(function(Type $t, ... $a) { }));
6465
}
6566

66-
#[@test, @action(new RuntimeVersion('>=7.0'))]
67+
#[@test, @action([new RuntimeVersion('>=7.0'), new IgnoredOnHHVM()])]
6768
public function function_with_typed_var_arg() {
6869
$this->assertEquals(FunctionType::forName('function(): var'), typeof(eval('return function(\lang\Type... $a) { };')));
6970
}
@@ -98,7 +99,7 @@ public function function_with_primitive_return_type() {
9899
$this->assertEquals(FunctionType::forName('function(): int'), typeof(eval('return function(): int { };')));
99100
}
100101

101-
#[@test, @action(new RuntimeVersion('>=7.1'))]
102+
#[@test, @action([new RuntimeVersion('>=7.1'), new IgnoredOnHHVM()])]
102103
public function function_with_void_return_type() {
103104
$this->assertEquals(FunctionType::forName('function(): void'), typeof(eval('return function(): void { };')));
104105
}

src/test/php/net/xp_framework/unittest/reflection/MethodParametersTest.class.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php namespace net\xp_framework\unittest\reflection;
22

3-
use net\xp_framework\unittest\Name;
3+
use net\xp_framework\unittest\{Name, IgnoredOnHHVM};
44
use unittest\actions\RuntimeVersion;
55
use lang\{
66
ArrayType,
@@ -234,7 +234,7 @@ public function parameter_representations($declaration, $expected) {
234234
$this->assertEquals($expected, $this->method($declaration.' { }')->getParameter(0)->toString());
235235
}
236236

237-
#[@test]
237+
#[@test, @action(new IgnoredOnHHVM())]
238238
public function variadic_via_syntax_with_type() {
239239
$param= $this->method('function fixture(string... $args) { }')->getParameter(0);
240240
$this->assertEquals(

src/test/php/net/xp_framework/unittest/reflection/MethodReturnTypesTest.class.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
use lang\{Type, Primitive, ArrayType, MapType, XPClass, Value};
44
use unittest\actions\RuntimeVersion;
5+
use net\xp_framework\unittest\IgnoredOnHHVM;
56

67
class MethodReturnTypesTest extends MethodsTest {
78

@@ -65,7 +66,7 @@ public function self_return_type() {
6566
$this->assertEquals($fixture, $fixture->getMethod('fixture')->getReturnType());
6667
}
6768

68-
#[@test, @action(new RuntimeVersion('>=7.1'))]
69+
#[@test, @action([new RuntimeVersion('>=7.1'), new IgnoredOnHHVM()])]
6970
public function void_return_type() {
7071
$fixture= $this->type('{ public function fixture(): void { } }');
7172
$this->assertEquals(Type::$VOID, $fixture->getMethod('fixture')->getReturnType());

0 commit comments

Comments
 (0)