mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-11-27 04:24:43 +01:00
Revert "Make tests compatible with PHP 7"
This reverts commit 91295a0790
.
This should no longer be necessary.
Conflicts:
test/PhpParser/ParserTest.php
This commit is contained in:
parent
d341d94976
commit
b9afcdfd92
@ -144,19 +144,6 @@ EOC;
|
|||||||
$parser = new Parser($lexer);
|
$parser = new Parser($lexer);
|
||||||
$parser->parse('dummy');
|
$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('<?php 0787; 0177777777777777777777787;');
|
|
||||||
$this->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 {
|
class InvalidTokenLexer extends Lexer {
|
||||||
|
@ -18,6 +18,7 @@ Different float syntaxes
|
|||||||
18446744073709551615;
|
18446744073709551615;
|
||||||
0xFFFFFFFFFFFFFFFF;
|
0xFFFFFFFFFFFFFFFF;
|
||||||
01777777777777777777777;
|
01777777777777777777777;
|
||||||
|
0177777777777777777777787;
|
||||||
0b1111111111111111111111111111111111111111111111111111111111111111;
|
0b1111111111111111111111111111111111111111111111111111111111111111;
|
||||||
-----
|
-----
|
||||||
array(
|
array(
|
||||||
@ -63,4 +64,7 @@ array(
|
|||||||
13: Scalar_DNumber(
|
13: Scalar_DNumber(
|
||||||
value: @@{ 0xFFFFFFFFFFFFFFFF }@@
|
value: @@{ 0xFFFFFFFFFFFFFFFF }@@
|
||||||
)
|
)
|
||||||
)
|
14: Scalar_DNumber(
|
||||||
|
value: @@{ 0xFFFFFFFFFFFFFFFF }@@
|
||||||
|
)
|
||||||
|
)
|
@ -10,6 +10,7 @@ Different integer syntaxes
|
|||||||
0xfff;
|
0xfff;
|
||||||
0XfFf;
|
0XfFf;
|
||||||
0777;
|
0777;
|
||||||
|
0787;
|
||||||
0b111000111000;
|
0b111000111000;
|
||||||
-----
|
-----
|
||||||
array(
|
array(
|
||||||
@ -38,6 +39,9 @@ array(
|
|||||||
value: 511
|
value: 511
|
||||||
)
|
)
|
||||||
8: Scalar_LNumber(
|
8: Scalar_LNumber(
|
||||||
|
value: 7
|
||||||
|
)
|
||||||
|
9: Scalar_LNumber(
|
||||||
value: 3640
|
value: 3640
|
||||||
)
|
)
|
||||||
)
|
)
|
Loading…
Reference in New Issue
Block a user