diff options
| author | Urban Müller | 2020-04-21 01:03:53 +0200 | 
|---|---|---|
| committer | Urban Müller | 2020-04-21 01:03:53 +0200 | 
| commit | d987adefc85095f057c3d6d3eb2fa4c0d487d32b (patch) | |
| tree | 4a6f7be8e35ff0c412666c41a46f22383d8ed5c2 /test/itjs.t | |
| parent | 1bd13e02d21ba01f38cd6df04de84b25a75a5264 (diff) | |
| download | itools-d987adefc85095f057c3d6d3eb2fa4c0d487d32b.tar.gz itools-d987adefc85095f057c3d6d3eb2fa4c0d487d32b.tar.bz2 itools-d987adefc85095f057c3d6d3eb2fa4c0d487d32b.zip | |
use new array syntax
Diffstat (limited to 'test/itjs.t')
| -rwxr-xr-x | test/itjs.t | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/test/itjs.t b/test/itjs.t index 777b1ec..caea542 100755 --- a/test/itjs.t +++ b/test/itjs.t @@ -14,43 +14,43 @@ is(  );  is( -	itjs::serialize(array()), +	itjs::serialize([]),  	'[]',  	'empty array'  );  is( -	itjs::serialize(array(0, "0")), +	itjs::serialize([0, "0"]),  	'[0,"0"]',  	'number strings stay strings'  );  is( -	itjs::serialize(array(null, "", false)), +	itjs::serialize([null, "", false]),  	'[null,"",false]',  	'null, empty string, false'  );  is( -	itjs::serialize(array('foo' => "bar", "qux", 42 => "quux")), +	itjs::serialize(['foo' => "bar", "qux", 42 => "quux"]),  	'{"foo":"bar","0":"qux","42":"quux"}',  	'key-value pairs'  );  is( -	itjs::serialize(array('foo' => array('bar' => array("qux", 42)))), +	itjs::serialize(['foo' => ['bar' => ["qux", 42]]]),  	'{"foo":{"bar":["qux",42]}}',  	'nested arrays'  );  is( -	itjs::serialize(array('import' => array('function' => array(true, 42)))), +	itjs::serialize(['import' => ['function' => [true, 42]]]),  	'{"import":{"function":[true,42]}}',  	'keywords'  );  is( -	itjs::serialize(array('foo"foo' => "bar")), +	itjs::serialize(['foo"foo' => "bar"]),  	'{"foo\"foo":"bar"}',  	"quote ' in keys"  ); |