tests/config/fail/event: add empty event test
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 25 Mar 2016 17:57:17 +0000 (13:57 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 25 Mar 2016 17:57:56 +0000 (13:57 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
tests/config/fail/event/fail.bats
tests/config/fail/event/no-fields-at-all.yaml [new file with mode: 0644]

index e911649994bbd12d85592df0efc5c604728f5530..40254cd8a9c3279be63fadb73f885def14aa5034 100644 (file)
@@ -37,3 +37,8 @@ load ../../common
   barectf_assert_file_exists pt-not-struct.yaml
   barectf_config_check_fail
 }
+
+@test 'empty event object makes barectf fail' {
+  barectf_assert_file_exists no-fields-at-all.yaml
+  barectf_config_check_fail
+}
diff --git a/tests/config/fail/event/no-fields-at-all.yaml b/tests/config/fail/event/no-fields-at-all.yaml
new file mode 100644 (file)
index 0000000..7782aa1
--- /dev/null
@@ -0,0 +1,17 @@
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event: {}
This page took 0.02302 seconds and 4 git commands to generate.