mirror of
https://github.com/halaxa/json-machine.git
synced 2025-03-15 17:09:39 +01:00
Added edge test cases proving correct order of decoding and encoding of JSON Pointer
This commit is contained in:
parent
9fa05acd41
commit
3b66b0856f
@ -45,6 +45,8 @@ class ParserTest extends \PHPUnit_Framework_TestCase
|
||||
['/', '{"":{"c":1,"d":2}}', [['c' => 1], ['d' => 2]]],
|
||||
['/~0', '{"~":{"c":1,"d":2}}', [['c' => 1], ['d' => 2]]],
|
||||
['/~1', '{"/":{"c":1,"d":2}}', [['c' => 1], ['d' => 2]]],
|
||||
['/~01', '{"~1":{"c":1,"d":2}}', [['c' => 1], ['d' => 2]]],
|
||||
['/~00', '{"~0":{"c":1,"d":2}}', [['c' => 1], ['d' => 2]]],
|
||||
['/path', '{"path":{"c":1,"d":2}}', [['c' => 1], ['d' => 2]]],
|
||||
['/path', '{"no":[null], "path":{"c":1,"d":2}}', [['c' => 1], ['d' => 2]]],
|
||||
['/0', '[{"c":1,"d":2}, [null]]', [['c' => 1], ['d' => 2]]],
|
||||
@ -342,6 +344,8 @@ class ParserTest extends \PHPUnit_Framework_TestCase
|
||||
['/', '{"":{"c":1,"d":2}}', ['/', '/']],
|
||||
['/~0', '{"~":{"c":1,"d":2}}', ['/~0', '/~0']],
|
||||
['/~1', '{"/":{"c":1,"d":2}}', ['/~1', '/~1']],
|
||||
['/~01', '{"~1":{"c":1,"d":2}}', ['/~01', '/~01']],
|
||||
['/~00', '{"~0":{"c":1,"d":2}}', ['/~00', '/~00']],
|
||||
['/~1/c', '{"/":{"c":[1,2],"d":2}}', ['/~1/c', '/~1/c']],
|
||||
['/0', '[{"c":1,"d":2}, [null]]', ['/0', '/0']],
|
||||
['/-', '[{"one": 1,"two": 2},{"three": 3,"four": 4}]', ['/0', '/0', '/1', '/1']],
|
||||
|
Loading…
x
Reference in New Issue
Block a user