From 65568985f0d8bedbbc70fa9be9d8ee569fc56e1b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 8 Dec 2021 08:04:01 -0500 Subject: Update affected tests --- tests/layouts/tab-crash.layout | 72 +++++++++++------------------------------- tests/layouts/tabs.layout | 35 ++++++++++---------- tests/layouts/valid-12.layout | 17 +++++----- tests/layouts/valid-13.layout | 17 +++++----- tests/testserialize.c | 10 ++++-- 5 files changed, 58 insertions(+), 93 deletions(-) diff --git a/tests/layouts/tab-crash.layout b/tests/layouts/tab-crash.layout index a0e83f5d..bdc7cedf 100644 --- a/tests/layouts/tab-crash.layout +++ b/tests/layouts/tab-crash.layout @@ -25,7 +25,6 @@ } ], "tabs" : { - "positions-in-pixels" : true, "positions" : [ { "position" : 80, @@ -39,8 +38,8 @@ "is-wrapped" : true, "is-ellipsized" : false, "unknown-glyphs" : 0, - "width" : 585728, - "height" : 585728, + "width" : 513024, + "height" : 513024, "log-attrs" : [ { "char-break" : true, @@ -951,7 +950,7 @@ }, { "start-index" : 55, - "length" : 37, + "length" : 45, "paragraph-start" : false, "direction" : "ltr", "runs" : [ @@ -1195,7 +1194,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 31744, + "width" : 64, "is-cluster-start" : true, "log-cluster" : 0 } @@ -1228,7 +1227,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 81920, + "width" : 80, "is-cluster-start" : true, "log-cluster" : 0 } @@ -1261,7 +1260,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 81920, + "width" : 80, "is-cluster-start" : true, "log-cluster" : 0 } @@ -1294,7 +1293,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 81920, + "width" : 80, "is-cluster-start" : true, "log-cluster" : 0 } @@ -1302,8 +1301,8 @@ }, { "offset" : 90, - "length" : 2, - "text" : "--", + "length" : 10, + "text" : "-->(MYSQL)", "bidi-level" : 0, "gravity" : "south", "language" : "en-us", @@ -1336,89 +1335,54 @@ "width" : 6144, "is-cluster-start" : true, "log-cluster" : 1 - } - ] - } - ] - }, - { - "start-index" : 92, - "length" : 8, - "paragraph-start" : false, - "direction" : "ltr", - "runs" : [ - { - "offset" : 92, - "length" : 8, - "text" : ">(MYSQL)", - "bidi-level" : 0, - "gravity" : "south", - "language" : "en-us", - "script" : "latin", - "font" : { - "description" : "DejaVu Sans 12", - "checksum" : "69ccd07023a72ceb27a5e5c22f728627353b60a198170f5e58dd7014221abf01", - "matrix" : [ - 1, - -0, - -0, - 1, - 0, - 0 - ] - }, - "flags" : 0, - "y-offset" : 0, - "start-x-offset" : 0, - "end-x-offset" : 0, - "glyphs" : [ + }, { "glyph" : 33, "width" : 13312, "is-cluster-start" : true, - "log-cluster" : 0 + "log-cluster" : 2 }, { "glyph" : 11, "width" : 6144, "is-cluster-start" : true, - "log-cluster" : 1 + "log-cluster" : 3 }, { "glyph" : 48, "width" : 14336, "is-cluster-start" : true, - "log-cluster" : 2 + "log-cluster" : 4 }, { "glyph" : 60, "width" : 10240, "is-cluster-start" : true, - "log-cluster" : 3 + "log-cluster" : 5 }, { "glyph" : 54, "width" : 10240, "is-cluster-start" : true, - "log-cluster" : 4 + "log-cluster" : 6 }, { "glyph" : 52, "width" : 13312, "is-cluster-start" : true, - "log-cluster" : 5 + "log-cluster" : 7 }, { "glyph" : 47, "width" : 9216, "is-cluster-start" : true, - "log-cluster" : 6 + "log-cluster" : 8 }, { "glyph" : 12, "width" : 6144, "is-cluster-start" : true, - "log-cluster" : 7 + "log-cluster" : 9 } ] } diff --git a/tests/layouts/tabs.layout b/tests/layouts/tabs.layout index ee022a9b..4e2f40cd 100644 --- a/tests/layouts/tabs.layout +++ b/tests/layouts/tabs.layout @@ -17,7 +17,6 @@ "text" : "\t0.1\t100.5\tso\tmore\tso\n\t0.02\t20.25\tand\tand\tand\n\t0.003\t1.9\tmore\tso\tmore", "font" : "Cantarell 14 @wght=400", "tabs" : { - "positions-in-pixels" : true, "positions" : [ { "position" : 50, @@ -51,8 +50,8 @@ "is-wrapped" : false, "is-ellipsized" : false, "unknown-glyphs" : 0, - "width" : 460800, - "height" : 460800, + "width" : 187392, + "height" : 187392, "log-attrs" : [ { "char-break" : true, @@ -541,7 +540,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 37376, + "width" : 0, "is-cluster-start" : true, "log-cluster" : 0 } @@ -625,7 +624,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 58368, + "width" : 0, "is-cluster-start" : true, "log-cluster" : 0 } @@ -721,7 +720,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 89600, + "width" : 0, "is-cluster-start" : true, "log-cluster" : 0 } @@ -799,7 +798,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 58880, + "width" : 0, "is-cluster-start" : true, "log-cluster" : 0 } @@ -889,7 +888,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 58880, + "width" : 0, "is-cluster-start" : true, "log-cluster" : 0 } @@ -975,7 +974,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 37376, + "width" : 0, "is-cluster-start" : true, "log-cluster" : 0 } @@ -1065,7 +1064,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 54272, + "width" : 0, "is-cluster-start" : true, "log-cluster" : 0 } @@ -1161,7 +1160,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 79360, + "width" : 0, "is-cluster-start" : true, "log-cluster" : 0 } @@ -1245,7 +1244,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 53248, + "width" : 0, "is-cluster-start" : true, "log-cluster" : 0 } @@ -1329,7 +1328,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 53248, + "width" : 0, "is-cluster-start" : true, "log-cluster" : 0 } @@ -1421,7 +1420,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 37376, + "width" : 0, "is-cluster-start" : true, "log-cluster" : 0 } @@ -1517,7 +1516,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 55296, + "width" : 0, "is-cluster-start" : true, "log-cluster" : 0 } @@ -1601,7 +1600,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 88576, + "width" : 0, "is-cluster-start" : true, "log-cluster" : 0 } @@ -1691,7 +1690,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 46080, + "width" : 0, "is-cluster-start" : true, "log-cluster" : 0 } @@ -1769,7 +1768,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 46080, + "width" : 0, "is-cluster-start" : true, "log-cluster" : 0 } diff --git a/tests/layouts/valid-12.layout b/tests/layouts/valid-12.layout index 3c09f51f..dbbbfa38 100644 --- a/tests/layouts/valid-12.layout +++ b/tests/layouts/valid-12.layout @@ -19,7 +19,6 @@ "text" : "a\tb\tc\td
e\tf\tg\th", "font" : "Cantarell 11", "tabs" : { - "positions-in-pixels" : true, "positions" : [ { "position" : 0, @@ -52,8 +51,8 @@ "is-wrapped" : true, "is-ellipsized" : false, "unknown-glyphs" : 1, - "width" : 179200, - "height" : 179200, + "width" : 49200, + "height" : 49200, "log-attrs" : [ { "char-break" : true, @@ -258,7 +257,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 43008, + "width" : 8, "is-cluster-start" : true, "log-cluster" : 0 } @@ -330,7 +329,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 43008, + "width" : 8, "is-cluster-start" : true, "log-cluster" : 0 } @@ -402,7 +401,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 44032, + "width" : 32, "is-cluster-start" : true, "log-cluster" : 0 } @@ -554,7 +553,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 43008, + "width" : 8, "is-cluster-start" : true, "log-cluster" : 0 } @@ -626,7 +625,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 46080, + "width" : 30, "is-cluster-start" : true, "log-cluster" : 0 } @@ -698,7 +697,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 43008, + "width" : 8, "is-cluster-start" : true, "log-cluster" : 0 } diff --git a/tests/layouts/valid-13.layout b/tests/layouts/valid-13.layout index cb2ac92a..8b2bf811 100644 --- a/tests/layouts/valid-13.layout +++ b/tests/layouts/valid-13.layout @@ -19,7 +19,6 @@ "text" : "a\tb\tc\td
e\tf\tg\th", "font" : "Cantarell 11", "tabs" : { - "positions-in-pixels" : true, "positions" : [ { "position" : 0, @@ -53,8 +52,8 @@ "is-wrapped" : false, "is-ellipsized" : false, "unknown-glyphs" : 1, - "width" : 315392, - "height" : 315392, + "width" : 78942, + "height" : 78942, "log-attrs" : [ { "char-break" : true, @@ -271,7 +270,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 43008, + "width" : 8, "is-cluster-start" : true, "log-cluster" : 0 } @@ -355,7 +354,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 43008, + "width" : 8, "is-cluster-start" : true, "log-cluster" : 0 } @@ -439,7 +438,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 44032, + "width" : 32, "is-cluster-start" : true, "log-cluster" : 0 } @@ -607,7 +606,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 17408, + "width" : 8, "is-cluster-start" : true, "log-cluster" : 0 } @@ -691,7 +690,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 46080, + "width" : 30, "is-cluster-start" : true, "log-cluster" : 0 } @@ -775,7 +774,7 @@ "glyphs" : [ { "glyph" : 268435455, - "width" : 43008, + "width" : 8, "is-cluster-start" : true, "log-cluster" : 0 } diff --git a/tests/testserialize.c b/tests/testserialize.c index e480da31..c50a8f31 100644 --- a/tests/testserialize.c +++ b/tests/testserialize.c @@ -88,7 +88,8 @@ test_serialize_tab_array (void) "20 10", "left:10px right:20px center:30px decimal:40px", "decimal:10240:94", - "" + "", + "1sp 5sp 10sp" }; const char *roundtripped[] = { "0\n10\n100\n200\n400", @@ -97,7 +98,8 @@ test_serialize_tab_array (void) "20\n10", "10px\nright:20px\ncenter:30px\ndecimal:40px", "decimal:10240:94", - "" + "", + "1sp\n5sp\n10sp" }; const char *invalid[] = { "not a tabarray", @@ -105,6 +107,8 @@ test_serialize_tab_array (void) "10ps 20pu", "10, 20", "10 20px 30", + "10 20sp 30", + "10sp 20sp 30px", }; for (int i = 0; i < G_N_ELEMENTS (valid); i++) @@ -246,7 +250,7 @@ test_serialize_layout_valid (void) " ],\n" " \"font\" : \"Sans Bold 32\",\n" " \"tabs\" : {\n" - " \"positions-in-pixels\" : true,\n" + " \"positions-in\" : \"pixels\",\n" " \"positions\" : [\n" " {\n" " \"position\" : 0,\n" -- cgit v1.2.1