tests/config/fail/stream: add tests for "$default" prop
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 7 Apr 2016 01:53:26 +0000 (21:53 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 7 Apr 2016 01:53:26 +0000 (21:53 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
tests/config/fail/stream/default-invalid-type.yaml [new file with mode: 0644]
tests/config/fail/stream/fail.bats

diff --git a/tests/config/fail/stream/default-invalid-type.yaml b/tests/config/fail/stream/default-invalid-type.yaml
new file mode 100644 (file)
index 0000000..c36b3bf
--- /dev/null
@@ -0,0 +1,24 @@
+version: '2.2'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      $default: 23
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
index 3b83ef675d2647cba5643657c3dec473817fc662..9200eab0c8a4f65a79a8560f984f68d11ec92189 100644 (file)
@@ -187,3 +187,8 @@ load ../../common
   barectf_assert_file_exists events-key-invalid-identifier.yaml
   barectf_config_check_fail
 }
+
+@test 'wrong "$default" property type in stream object makes barectf fail' {
+  barectf_assert_file_exists default-invalid-type.yaml
+  barectf_config_check_fail
+}
This page took 0.025368 seconds and 4 git commands to generate.