From b9afcdfd9241219709963be1220860a03b32bb5e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 14 Jul 2015 19:21:38 +0200 Subject: [PATCH] Revert "Make tests compatible with PHP 7" This reverts commit 91295a07903fbd28d1f5c52611968ce0b3a4517e. This should no longer be necessary. Conflicts: test/PhpParser/ParserTest.php --- test/PhpParser/ParserTest.php | 13 ------------- test/code/parser/scalar/float.test | 6 +++++- test/code/parser/scalar/int.test | 6 +++++- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/test/PhpParser/ParserTest.php b/test/PhpParser/ParserTest.php index 12eebff..b066ee1 100644 --- a/test/PhpParser/ParserTest.php +++ b/test/PhpParser/ParserTest.php @@ -144,19 +144,6 @@ EOC; $parser = new Parser($lexer); $parser->parse('dummy'); } - - public function testInvalidOctals() { - if (version_compare(PHP_VERSION, '7.0-dev', '>=')) { - $this->markTestSkipped('Cannot parse invalid octal numbers on PHP 7'); - } - - $parser = new Parser(new Lexer); - $stmts = $parser->parse('assertInstanceof('PhpParser\Node\Scalar\LNumber', $stmts[0]); - $this->assertInstanceof('PhpParser\Node\Scalar\DNumber', $stmts[1]); - $this->assertSame(7, $stmts[0]->value); - $this->assertSame(0xFFFFFFFFFFFFFFFF, $stmts[1]->value); - } } class InvalidTokenLexer extends Lexer { diff --git a/test/code/parser/scalar/float.test b/test/code/parser/scalar/float.test index 2c9d97e..c91b7ac 100644 --- a/test/code/parser/scalar/float.test +++ b/test/code/parser/scalar/float.test @@ -18,6 +18,7 @@ Different float syntaxes 18446744073709551615; 0xFFFFFFFFFFFFFFFF; 01777777777777777777777; +0177777777777777777777787; 0b1111111111111111111111111111111111111111111111111111111111111111; ----- array( @@ -63,4 +64,7 @@ array( 13: Scalar_DNumber( value: @@{ 0xFFFFFFFFFFFFFFFF }@@ ) -) + 14: Scalar_DNumber( + value: @@{ 0xFFFFFFFFFFFFFFFF }@@ + ) +) \ No newline at end of file diff --git a/test/code/parser/scalar/int.test b/test/code/parser/scalar/int.test index 38440c1..17a5785 100644 --- a/test/code/parser/scalar/int.test +++ b/test/code/parser/scalar/int.test @@ -10,6 +10,7 @@ Different integer syntaxes 0xfff; 0XfFf; 0777; +0787; 0b111000111000; ----- array( @@ -38,6 +39,9 @@ array( value: 511 ) 8: Scalar_LNumber( + value: 7 + ) + 9: Scalar_LNumber( value: 3640 ) -) +) \ No newline at end of file