aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2010-07-23 20:40:10 +0800
committerXavier Claessens <xclaesse@gmail.com>2010-07-30 19:11:40 +0800
commit6f3136b0a2168dee114dae4381f9e5c0b9d0ba0d (patch)
tree52d75909599eb53aef3acb9447c4b7b043f8c915
parent3251e70779cb69865797a32da731194eaa89f882 (diff)
downloadgsoc2013-empathy-6f3136b0a2168dee114dae4381f9e5c0b9d0ba0d.tar
gsoc2013-empathy-6f3136b0a2168dee114dae4381f9e5c0b9d0ba0d.tar.gz
gsoc2013-empathy-6f3136b0a2168dee114dae4381f9e5c0b9d0ba0d.tar.bz2
gsoc2013-empathy-6f3136b0a2168dee114dae4381f9e5c0b9d0ba0d.tar.lz
gsoc2013-empathy-6f3136b0a2168dee114dae4381f9e5c0b9d0ba0d.tar.xz
gsoc2013-empathy-6f3136b0a2168dee114dae4381f9e5c0b9d0ba0d.tar.zst
gsoc2013-empathy-6f3136b0a2168dee114dae4381f9e5c0b9d0ba0d.zip
Abort directly if a test failed
-rw-r--r--tests/empathy-live-search-test.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/empathy-live-search-test.c b/tests/empathy-live-search-test.c
index 377470e60..2f02468d0 100644
--- a/tests/empathy-live-search-test.c
+++ b/tests/empathy-live-search-test.c
@@ -49,7 +49,6 @@ test_live_search (void)
{ NULL, NULL, FALSE }
};
guint i;
- gboolean failed = FALSE;
DEBUG ("Started");
for (i = 0; tests[i].string != NULL; i ++)
@@ -60,13 +59,12 @@ test_live_search (void)
match = empathy_live_search_match_string (tests[i].string, tests[i].prefix);
ok = (match == tests[i].should_match);
- DEBUG ("'%s' - '%s': %s", tests[i].string, tests[i].prefix, ok ? "OK" : "FAILED");
+ DEBUG ("'%s' - '%s' %s: %s", tests[i].string, tests[i].prefix,
+ tests[i].should_match ? "should match" : "should NOT match",
+ ok ? "OK" : "FAILED");
- if (!ok)
- failed = TRUE;
+ g_assert (ok);
}
-
- g_assert (!failed);
}
int