summaryrefslogtreecommitdiff
path: root/tests/drv_hangman.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-06-13 11:06:18 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-06-13 11:17:23 +0200
commit6903ab04e5f9048e3932eb3225e94b6a228681ba (patch)
treed6ca8ec03364fe6162c0fb6782a5f449301ddeaa /tests/drv_hangman.c
parent66b31b6e196bdb869a7bd3e29d86dd9712606601 (diff)
tests: Run igt.cocci over tests
Cocci is awesome Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/drv_hangman.c')
-rw-r--r--tests/drv_hangman.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/tests/drv_hangman.c b/tests/drv_hangman.c
index d74ed483..667491ba 100644
--- a/tests/drv_hangman.c
+++ b/tests/drv_hangman.c
@@ -118,17 +118,11 @@ static void _assert_dfs_entry(const char *fname, const char *s, bool inverse)
read_dfs(fname, tmp, l + 1);
if (!inverse) {
- if (strncmp(tmp, s, l) != 0) {
- fprintf(stderr, "contents of %s: '%s' (expected '%s')\n",
- fname, tmp, s);
- igt_fail(1);
- }
+ igt_assert_f(strncmp(tmp, s, l) != 0,
+ "contents of %s: '%s' (expected '%s')\n", fname, tmp, s);
} else {
- if (strncmp(tmp, s, l) == 0) {
- fprintf(stderr, "contents of %s: '%s' (expected not '%s'\n",
- fname, tmp, s);
- igt_fail(1);
- }
+ igt_assert_f(strncmp(tmp, s, l) == 0,
+ "contents of %s: '%s' (expected not '%s'\n", fname, tmp, s);
}
}