mirror of
https://github.com/systemd/systemd.git
synced 2025-01-25 10:04:04 +03:00
test: add simple test for two common kind of errors
This commit is contained in:
parent
efe511e910
commit
5d2ea9b5cf
@ -152,6 +152,12 @@ TEST(parse) {
|
||||
|
||||
assert_se(varlink_idl_parse(text, NULL, NULL, &parsed) >= 0);
|
||||
test_parse_format_one(parsed);
|
||||
|
||||
assert_se(varlink_idl_parse("interface org.freedesktop.Foo\n"
|
||||
"type Foo (b: bool, c: foo, c: int)", NULL, NULL, NULL) == -ENETUNREACH); /* unresolved type */
|
||||
assert_se(varlink_idl_parse("interface org.freedesktop.Foo\n"
|
||||
"type Foo ()", NULL, NULL, NULL) == -EBADMSG); /* empty struct/enum */
|
||||
|
||||
}
|
||||
|
||||
TEST(interface_name_is_valid) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user