diff options
Diffstat (limited to 'tests/testserialize.c')
-rw-r--r-- | tests/testserialize.c | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/tests/testserialize.c b/tests/testserialize.c index 4ea7425e..95fb4cd4 100644 --- a/tests/testserialize.c +++ b/tests/testserialize.c @@ -86,18 +86,22 @@ test_serialize_tab_array (void) "0px 10px 100px 200px 400px", " 0 10 ", "20 10", + "left:10px right:20px center:30px decimal:40px", + "decimal:10240:94", "" }; const char *roundtripped[] = { - "0 10 100 200 400", - "0px 10px 100px 200px 400px", - "0 10", - "20 10", + "0\n10\n100\n200\n400", + "0px\n10px\n100px\n200px\n400px", + "0\n10", + "20\n10", + "10px\nright:20px\ncenter:30px\ndecimal:40px", + "decimal:10240:94", "" }; const char *invalid[] = { "not a tabarray", - "-10\n-20", + "-10:-20", "10ps 20pu", "10, 20", "10 20px 30", @@ -231,9 +235,21 @@ test_serialize_layout_valid (void) " \"tabs\" : {\n" " \"positions-in-pixels\" : true,\n" " \"positions\" : [\n" - " 0,\n" - " 50,\n" - " 100\n" + " {\n" + " \"position\" : 0,\n" + " \"alignment\" : \"left\",\n" + " \"decimal-point\" : 0\n" + " },\n" + " {\n" + " \"position\" : 50,\n" + " \"alignment\" : \"center\",\n" + " \"decimal-point\" : 0\n" + " },\n" + " {\n" + " \"position\" : 100,\n" + " \"alignment\" : \"decimal\",\n" + " \"decimal-point\" : 94\n" + " }\n" " ]\n" " },\n" " \"alignment\" : \"center\",\n" |