Add metadata test cases
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 29 Apr 2011 00:39:32 +0000 (20:39 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 29 Apr 2011 00:39:32 +0000 (20:39 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/metadata/ctf-test/fail/array-negative-len.txt [new file with mode: 0644]
formats/ctf/metadata/ctf-test/fail/array-unexisting-elem-type.txt [new file with mode: 0644]
formats/ctf/metadata/ctf-test/fail/sequence-incorrect-elem-type.txt [new file with mode: 0644]
formats/ctf/metadata/ctf-test/fail/sequence-incorrect-len-type-signedness.txt [new file with mode: 0644]
formats/ctf/metadata/ctf-test/fail/sequence-incorrect-len-type.txt [new file with mode: 0644]
formats/ctf/metadata/ctf-test/fail/struct-unexisting-field-type.txt [new file with mode: 0644]
formats/ctf/metadata/ctf-test/fail/typedef-untagged-variant.txt [new file with mode: 0644]
formats/ctf/metadata/ctf-test/fail/variant-unexisting-field-type.txt [new file with mode: 0644]
formats/ctf/metadata/ctf-test/succeed/ctf-test.txt

diff --git a/formats/ctf/metadata/ctf-test/fail/array-negative-len.txt b/formats/ctf/metadata/ctf-test/fail/array-negative-len.txt
new file mode 100644 (file)
index 0000000..1f90a39
--- /dev/null
@@ -0,0 +1,2 @@
+typealias integer { size = 32; align = 32; signedness = false; } := uint;
+typedef uint myarray[-10];
diff --git a/formats/ctf/metadata/ctf-test/fail/array-unexisting-elem-type.txt b/formats/ctf/metadata/ctf-test/fail/array-unexisting-elem-type.txt
new file mode 100644 (file)
index 0000000..cd93c77
--- /dev/null
@@ -0,0 +1 @@
+typedef nonexist myarray[10];
diff --git a/formats/ctf/metadata/ctf-test/fail/sequence-incorrect-elem-type.txt b/formats/ctf/metadata/ctf-test/fail/sequence-incorrect-elem-type.txt
new file mode 100644 (file)
index 0000000..0c9eb4f
--- /dev/null
@@ -0,0 +1,2 @@
+typealias integer { size = 32; align = 32; signed = false; } := uint;
+typedef nonexist testseq[uint];
diff --git a/formats/ctf/metadata/ctf-test/fail/sequence-incorrect-len-type-signedness.txt b/formats/ctf/metadata/ctf-test/fail/sequence-incorrect-len-type-signedness.txt
new file mode 100644 (file)
index 0000000..90d07a5
--- /dev/null
@@ -0,0 +1,3 @@
+typealias integer { size = 32; align = 32; signed = false; } := uint;
+typealias integer { size = 32; align = 32; signed = true; } := int;
+typedef uint testseq[int];
diff --git a/formats/ctf/metadata/ctf-test/fail/sequence-incorrect-len-type.txt b/formats/ctf/metadata/ctf-test/fail/sequence-incorrect-len-type.txt
new file mode 100644 (file)
index 0000000..1f657f6
--- /dev/null
@@ -0,0 +1,3 @@
+struct name {};
+typealias integer { size = 32; align = 32; signed = false; } := uint;
+typedef uint testseq[struct name];
diff --git a/formats/ctf/metadata/ctf-test/fail/struct-unexisting-field-type.txt b/formats/ctf/metadata/ctf-test/fail/struct-unexisting-field-type.txt
new file mode 100644 (file)
index 0000000..ef63fb7
--- /dev/null
@@ -0,0 +1,4 @@
+struct test {
+       int a;
+       int b;
+};
diff --git a/formats/ctf/metadata/ctf-test/fail/typedef-untagged-variant.txt b/formats/ctf/metadata/ctf-test/fail/typedef-untagged-variant.txt
new file mode 100644 (file)
index 0000000..6ca4031
--- /dev/null
@@ -0,0 +1,6 @@
+typealias integer { size = 32; align = 32; signed = true; } := int;
+
+typedef variant {
+       int a;
+       int b;
+} name;
diff --git a/formats/ctf/metadata/ctf-test/fail/variant-unexisting-field-type.txt b/formats/ctf/metadata/ctf-test/fail/variant-unexisting-field-type.txt
new file mode 100644 (file)
index 0000000..10d6155
--- /dev/null
@@ -0,0 +1,4 @@
+variant test {
+       int a;
+       int b;
+};
index 34dd8274f863a321637935765be44fa37a1c5444..efbd3707ae2face9ccc72c45255a6c8a372dbc52 100644 (file)
@@ -1,5 +1,6 @@
 
 typealias integer { size = 32; align = 32; signed = true; } := int;
+typealias integer { size = 32; align = 32; signed = false; } := uint;
 typealias integer { size = 64; align = 64; signed = true; } := long;
 typealias integer { size = 64; align = 64; } := unsigned long;
 
@@ -178,3 +179,21 @@ event {
 };
 
 typealias integer { size = 32; align = 32; signed = false; } := unsigned long long *;
+
+variant vardecl {
+       int a;
+       int b;
+};
+
+event {
+       name = test_event2;
+       id = 1;
+       stream_id = 5;
+       payload := struct {
+               enum : char { a = 0, b = 1, } tag;
+               variant vardecl <tag> myvariant;
+       };
+};
+
+typedef int myarray[10];
+typedef int myseq[uint];
This page took 0.026684 seconds and 4 git commands to generate.