summaryrefslogtreecommitdiff
path: root/tests/testserialize.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-11-28 18:38:26 -0500
committerMatthias Clasen <mclasen@redhat.com>2021-11-29 08:12:11 -0500
commit60ae4ac4cf481e49f5ccbc4c97c95bb961620d61 (patch)
tree57524d0e9b99f2541d5601e18762ac2500b919c1 /tests/testserialize.c
parentb8dbc92ab571d88f9d9dca4a61ade2492c6e0642 (diff)
downloadpango-60ae4ac4cf481e49f5ccbc4c97c95bb961620d61.tar.gz
serializer: Support tab alignments
Serialize tab alignment in addition to tab position. We still accept the old format and default alignment to left. Update testserialize and layout tests for this.
Diffstat (limited to 'tests/testserialize.c')
-rw-r--r--tests/testserialize.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/testserialize.c b/tests/testserialize.c
index 4ea7425e..325338f1 100644
--- a/tests/testserialize.c
+++ b/tests/testserialize.c
@@ -86,6 +86,7 @@ test_serialize_tab_array (void)
"0px 10px 100px 200px 400px",
" 0 10 ",
"20 10",
+ "left:10px right:20px center:30px decimal:40px",
""
};
const char *roundtripped[] = {
@@ -93,6 +94,7 @@ test_serialize_tab_array (void)
"0px 10px 100px 200px 400px",
"0 10",
"20 10",
+ "10px right:20px center:30px decimal:40px",
""
};
const char *invalid[] = {
@@ -231,9 +233,18 @@ 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"
+ " },\n"
+ " {\n"
+ " \"position\" : 50,\n"
+ " \"alignment\" : \"center\"\n"
+ " },\n"
+ " {\n"
+ " \"position\" : 100,\n"
+ " \"alignment\" : \"right\"\n"
+ " }\n"
" ]\n"
" },\n"
" \"alignment\" : \"center\",\n"