aboutsummaryrefslogtreecommitdiff
path: root/tests/test-visitor-serialization.c
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2013-07-25 18:21:28 +0200
committerMichael Tokarev <mjt@tls.msk.ru>2013-07-27 11:22:54 +0400
commitdfc6f86567c58bc4dd02f4db098fc4c2221e85b5 (patch)
treed493db0a108de25c7d2afaab885ec2d39ffe2c74 /tests/test-visitor-serialization.c
parentb031f413b9e68899032f04fc05fd0a6b62039b2b (diff)
misc: Use g_assert_not_reached for code which is expected to be unreachable
The macro g_assert_not_reached is a better self documenting replacement for assert(0) or assert(false). Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'tests/test-visitor-serialization.c')
-rw-r--r--tests/test-visitor-serialization.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test-visitor-serialization.c b/tests/test-visitor-serialization.c
index ee7916b806..9aaa5872e5 100644
--- a/tests/test-visitor-serialization.c
+++ b/tests/test-visitor-serialization.c
@@ -136,7 +136,7 @@ static void visit_primitive_type(Visitor *v, void **native, Error **errp)
visit_type_int64(v, &pt->value.s64, NULL, errp);
break;
case PTYPE_EOL:
- g_assert(false);
+ g_assert_not_reached();
}
}
@@ -181,7 +181,7 @@ static void visit_primitive_list(Visitor *v, void **native, Error **errp)
visit_type_uint64List(v, &pl->value.u64_integers, NULL, errp);
break;
default:
- g_assert(false);
+ g_assert_not_reached();
}
}
@@ -500,7 +500,7 @@ static void test_primitive_lists(gconstpointer opaque)
break;
}
default:
- g_assert(0);
+ g_assert_not_reached();
}
}
@@ -656,7 +656,7 @@ static void test_primitive_lists(gconstpointer opaque)
break;
}
default:
- g_assert(0);
+ g_assert_not_reached();
}
i++;
} while (cur_head);