summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-01-18 07:24:44 -0500
committerMatthias Clasen <mclasen@redhat.com>2022-01-21 00:29:44 -0500
commit446ec7396b434911ee9d14bcc7df89f8b302bfcd (patch)
treef36ffbf1c1612908e3ce0cb378fd2432155789ac
parent5b3990d18d744170e2fb84b88875080f540bef8b (diff)
downloadpango-446ec7396b434911ee9d14bcc7df89f8b302bfcd.tar.gz
Quiet down break tests
The output from the testboundaries tests just overwhelms the test reports and makes it hard to find the actual problems. Stop that. You can still get the noise, by passing --verbose to the tests.
-rw-r--r--tests/testboundaries.c18
-rw-r--r--tests/testboundaries_ucd.c12
2 files changed, 15 insertions, 15 deletions
diff --git a/tests/testboundaries.c b/tests/testboundaries.c
index 2390bb28..dbc3b5b7 100644
--- a/tests/testboundaries.c
+++ b/tests/testboundaries.c
@@ -154,26 +154,26 @@ check_line_char (gunichar wc,
{
if (prev_wc == '\r')
{
- g_test_message ("Do not line break between \\r and \\n");
+ if (g_test_verbose ()) if (g_test_verbose ()) g_test_message ("Do not line break between \\r and \\n");
g_assert_false (attr->is_line_break);
}
if (next_attr != NULL)
{
- g_test_message ("Line break after \\n");
+ if (g_test_verbose ()) g_test_message ("Line break after \\n");
g_assert_true (next_attr->is_line_break);
}
}
if (attr->is_line_break)
{
- g_test_message ("first char in string should not be marked as a line break");
+ if (g_test_verbose ()) g_test_message ("first char in string should not be marked as a line break");
g_assert_false (prev_wc == 0);
}
if (break_type == G_UNICODE_BREAK_SPACE)
{
- g_test_message ("can't break lines before a space unless a mandatory break char precedes it or a combining mark follows; prev char was: " CHFORMAT, prev_wc);
+ if (g_test_verbose ()) g_test_message ("can't break lines before a space unless a mandatory break char precedes it or a combining mark follows; prev char was: " CHFORMAT, prev_wc);
g_assert_false (attr->is_line_break && prev_attr != NULL &&
!attr->is_mandatory_break &&
!(next_wc && g_unichar_break_type (next_wc) == G_UNICODE_BREAK_COMBINING_MARK));
@@ -181,7 +181,7 @@ check_line_char (gunichar wc,
if (attr->is_mandatory_break)
{
- g_test_message ("mandatory breaks must also be marked as regular breaks");
+ if (g_test_verbose ()) g_test_message ("mandatory breaks must also be marked as regular breaks");
g_assert_true (attr->is_line_break);
}
@@ -191,19 +191,19 @@ check_line_char (gunichar wc,
* be that hard to do.
*/
- g_test_message ("can't break between two open punctuation chars");
+ if (g_test_verbose ()) g_test_message ("can't break between two open punctuation chars");
g_assert_false (break_type == G_UNICODE_BREAK_OPEN_PUNCTUATION &&
prev_break_type == G_UNICODE_BREAK_OPEN_PUNCTUATION &&
attr->is_line_break &&
!attr->is_mandatory_break);
- g_test_message ("can't break between two close punctuation chars");
+ if (g_test_verbose ()) g_test_message ("can't break between two close punctuation chars");
g_assert_false (break_type == G_UNICODE_BREAK_CLOSE_PUNCTUATION &&
prev_break_type == G_UNICODE_BREAK_CLOSE_PUNCTUATION &&
attr->is_line_break &&
!attr->is_mandatory_break);
- g_test_message ("can't break letter-quotemark sequence");
+ if (g_test_verbose ()) g_test_message ("can't break letter-quotemark sequence");
g_assert_false (break_type == G_UNICODE_BREAK_QUOTATION &&
prev_break_type == G_UNICODE_BREAK_ALPHABETIC &&
attr->is_line_break &&
@@ -310,7 +310,7 @@ test_boundaries (void)
filename = g_test_get_filename (G_TEST_DIST, "boundaries.utf8", NULL);
- g_test_message ("sample file: %s\n", filename);
+ if (g_test_verbose ()) g_test_message ("sample file: %s\n", filename);
g_file_get_contents (filename, &text, NULL, &error);
g_assert_no_error (error);
diff --git a/tests/testboundaries_ucd.c b/tests/testboundaries_ucd.c
index 8abf0b7a..bcc7ed45 100644
--- a/tests/testboundaries_ucd.c
+++ b/tests/testboundaries_ucd.c
@@ -239,7 +239,7 @@ do_test (const gchar *filename,
g_assert_no_error (error);
- g_test_message ("Filename: %s", filename);
+ if (g_test_verbose ()) g_test_message ("Filename: %s", filename);
i = 1;
for (;;)
@@ -268,7 +268,7 @@ do_test (const gchar *filename,
break;
}
- g_test_message ("Parsing line: %s", line);
+ if (g_test_verbose ()) g_test_message ("Parsing line: %s", line);
g_assert_true (parse_line (line, bits, &string, &expected_attrs, &num_attrs));
if (num_attrs > 0)
@@ -290,10 +290,10 @@ do_test (const gchar *filename,
comments = (char *)"";
}
- g_test_message ("%s: line %d failed", filename, i);
- g_test_message (" expected: %s", line);
- g_test_message (" returned: %s", str);
- g_test_message (" comments: %s", comments);
+ if (g_test_verbose ()) g_test_message ("%s: line %d failed", filename, i);
+ if (g_test_verbose ()) g_test_message (" expected: %s", line);
+ if (g_test_verbose ()) g_test_message (" returned: %s", str);
+ if (g_test_verbose ()) g_test_message (" comments: %s", comments);
g_free (str);
failed = TRUE;