]> Nishi Git Mirror - gwion.git/commitdiff
:white_check_mark: Update tests (parralel lib testing)
authorfennecdjay <fennecdjay@gwion.tk>
Wed, 4 Nov 2020 13:21:20 +0000 (14:21 +0100)
committerfennecdjay <fennecdjay@gwion.tk>
Wed, 4 Nov 2020 13:21:20 +0000 (14:21 +0100)
71 files changed:
scripts/test.sh
tests/plug/array.gw [new file with mode: 0644]
tests/plug/array_in_var_name.gw [new file with mode: 0644]
tests/plug/array_in_var_name_fail.gw [new file with mode: 0644]
tests/plug/array_incoherent_in_var_name.gw [new file with mode: 0644]
tests/plug/array_invalid_in_var_name.gw [new file with mode: 0644]
tests/plug/callback.gw [new file with mode: 0644]
tests/plug/class_template.gw
tests/plug/class_template_fail.gw [new file with mode: 0644]
tests/plug/class_template_invalid.gw [new file with mode: 0644]
tests/plug/compile_file.gw [new file with mode: 0644]
tests/plug/compile_string.gw [new file with mode: 0644]
tests/plug/coverage.gw
tests/plug/empty_union.gw [new file with mode: 0644]
tests/plug/end_class.gw [new file with mode: 0644]
tests/plug/enum.gw
tests/plug/enum_fail.gw [new file with mode: 0644]
tests/plug/enum_fail2.gw [new file with mode: 0644]
tests/plug/enum_fail3.gw [new file with mode: 0644]
tests/plug/extend_array.gw
tests/plug/fail_on_next_arg.gw [new file with mode: 0644]
tests/plug/fail_on_next_arg2.gw [new file with mode: 0644]
tests/plug/fptr.gw
tests/plug/fptr_tmpl.gw [new file with mode: 0644]
tests/plug/fptr_tmpl_fail.gw [new file with mode: 0644]
tests/plug/func_fail.gw [new file with mode: 0644]
tests/plug/func_fail2.gw [new file with mode: 0644]
tests/plug/func_fail3.gw [new file with mode: 0644]
tests/plug/func_fail4.gw [new file with mode: 0644]
tests/plug/func_subscript_not_empty.gw [new file with mode: 0644]
tests/plug/func_tmpl.gw
tests/plug/func_tmpl_fail.gw [new file with mode: 0644]
tests/plug/func_too_many_arg.gw [new file with mode: 0644]
tests/plug/global_func.gw
tests/plug/global_var.gw
tests/plug/invalid_arg.gw [new file with mode: 0644]
tests/plug/invalid_array.gw [new file with mode: 0644]
tests/plug/invalid_func.gw [new file with mode: 0644]
tests/plug/invalid_names.gw [new file with mode: 0644]
tests/plug/invalid_names0.gw [new file with mode: 0644]
tests/plug/invalid_names1.gw [new file with mode: 0644]
tests/plug/invalid_names2.gw [new file with mode: 0644]
tests/plug/invalid_names3.gw [new file with mode: 0644]
tests/plug/invalid_type1.gw [new file with mode: 0644]
tests/plug/invalid_type2.gw [new file with mode: 0644]
tests/plug/invalid_type3.gw [new file with mode: 0644]
tests/plug/mk_type_array.gw [new file with mode: 0644]
tests/plug/no_import.gw [new file with mode: 0644]
tests/plug/not_importing.gw [new file with mode: 0644]
tests/plug/op_already_imported.gw
tests/plug/pass.gw [new file with mode: 0644]
tests/plug/specialid_emit.gw
tests/plug/static_string.gw
tests/plug/str2decl.gw [new file with mode: 0644]
tests/plug/str2list_fail.gw [new file with mode: 0644]
tests/plug/template_arg.gw [new file with mode: 0644]
tests/plug/trig.gw
tests/plug/typedef.gw
tests/plug/typedef_fail.gw [new file with mode: 0644]
tests/plug/typedef_tmpl.gw [new file with mode: 0644]
tests/plug/ugen_connect.gw [new file with mode: 0644]
tests/plug/union.gw
tests/plug/union_fail_exp.gw [new file with mode: 0644]
tests/plug/union_member.gw [new file with mode: 0644]
tests/plug/union_name.gw
tests/plug/union_tmpl.gw
tests/plug/union_tmpl_fail.gw [new file with mode: 0644]
tests/plug/union_tmpl_fail2.gw [new file with mode: 0644]
tests/plug/union_tmpl_fail3.gw [new file with mode: 0644]
tests/plug/variadic.gw
tests/plug/vm_remove.gw

index f02f8bad68a601623b5e11c447edbf2b93254612..3cde06d20587af1f4b63fc03ed055eee1d43e6a6 100644 (file)
@@ -230,8 +230,8 @@ test_dir() {
   grep '\.sh' <<< "$(ls "$1")" &> /dev/null && found=1
   if [ "$found" -eq 1 ]
   then
-    local old_async=$async
-    async=0;
+#    local old_async=$async
+#    async=0;
     #          [ -f ${GWION_TEST_DIR}/${GWION_TEST_PREFIX}bailout ] && exit 1
     for file in "$1"/*.sh
     do
@@ -242,7 +242,7 @@ test_dir() {
       bash "$file" "$((n))"
       n=$((n+count))
     done
-    async=$old_async
+#    async=$old_async
   fi
 }
 
diff --git a/tests/plug/array.gw b/tests/plug/array.gw
new file mode 100644 (file)
index 0000000..8958ace
--- /dev/null
@@ -0,0 +1,2 @@
+#require array
+<<< __file__ >>>;
diff --git a/tests/plug/array_in_var_name.gw b/tests/plug/array_in_var_name.gw
new file mode 100644 (file)
index 0000000..c6e79b5
--- /dev/null
@@ -0,0 +1,2 @@
+#require array_in_var_name
+<<< __file__ >>>;
diff --git a/tests/plug/array_in_var_name_fail.gw b/tests/plug/array_in_var_name_fail.gw
new file mode 100644 (file)
index 0000000..122ac5f
--- /dev/null
@@ -0,0 +1,2 @@
+#require array_in_var_name_fail
+<<< __file__ >>>;
diff --git a/tests/plug/array_incoherent_in_var_name.gw b/tests/plug/array_incoherent_in_var_name.gw
new file mode 100644 (file)
index 0000000..a7e9493
--- /dev/null
@@ -0,0 +1,2 @@
+#require array_incoherent_in_var_name
+<<< __file__ >>>;
diff --git a/tests/plug/array_invalid_in_var_name.gw b/tests/plug/array_invalid_in_var_name.gw
new file mode 100644 (file)
index 0000000..0d9b749
--- /dev/null
@@ -0,0 +1,2 @@
+#require array_invalid_in_var_name
+<<< __file__ >>>;
diff --git a/tests/plug/callback.gw b/tests/plug/callback.gw
new file mode 100644 (file)
index 0000000..832778b
--- /dev/null
@@ -0,0 +1,2 @@
+#require callback
+<<< __file__ >>>;
index 384326902fc33e3a145aedcad2a515d171ea5cb1..264e0021ee3e91921bcc9359cabc165ec1edcaec 100644 (file)
@@ -1,2 +1,3 @@
+#require class_template
 var ClassTemplate:[int, int] ct;
 <<< ct.key >>>;
diff --git a/tests/plug/class_template_fail.gw b/tests/plug/class_template_fail.gw
new file mode 100644 (file)
index 0000000..c07b0f8
--- /dev/null
@@ -0,0 +1,2 @@
+#require class_template_fail
+<<< __file__ >>>;
diff --git a/tests/plug/class_template_invalid.gw b/tests/plug/class_template_invalid.gw
new file mode 100644 (file)
index 0000000..55d995a
--- /dev/null
@@ -0,0 +1,2 @@
+#require class_template_invalid
+<<< __file__ >>>;
diff --git a/tests/plug/compile_file.gw b/tests/plug/compile_file.gw
new file mode 100644 (file)
index 0000000..ed03ba6
--- /dev/null
@@ -0,0 +1,2 @@
+#require compile_file
+<<< __file__ >>>;
diff --git a/tests/plug/compile_string.gw b/tests/plug/compile_string.gw
new file mode 100644 (file)
index 0000000..b6ea861
--- /dev/null
@@ -0,0 +1,2 @@
+#require compile_string
+<<< __file__ >>>;
index 99b0ccf1b3089a04fe3f59c601a2205049656fdb..e0d54055995ba2679d866d343d404488052448bc 100644 (file)
@@ -1,3 +1,4 @@
+#require coverage
 <<< var float f >>>;
 var Coverage c;
 c.s_i;
diff --git a/tests/plug/empty_union.gw b/tests/plug/empty_union.gw
new file mode 100644 (file)
index 0000000..6fb2d2c
--- /dev/null
@@ -0,0 +1,2 @@
+#require empty_union
+<<< __file__ >>>;
diff --git a/tests/plug/end_class.gw b/tests/plug/end_class.gw
new file mode 100644 (file)
index 0000000..ff98b7f
--- /dev/null
@@ -0,0 +1,2 @@
+#require end_class
+<<< __file__ >>>;
index 0d8ddb596797b644e8b687818c5a2d47d98b475e..a2682e7c01f446d9ce318a98257fd04b35db8b45 100644 (file)
@@ -1,3 +1,4 @@
+#require enum
 #! untyped global enum
 <<< ENUM0 >>>;
 <<< ENUM1 >>>;
diff --git a/tests/plug/enum_fail.gw b/tests/plug/enum_fail.gw
new file mode 100644 (file)
index 0000000..8fc0048
--- /dev/null
@@ -0,0 +1,2 @@
+#require enum_fail
+<<< __file__ >>>;
diff --git a/tests/plug/enum_fail2.gw b/tests/plug/enum_fail2.gw
new file mode 100644 (file)
index 0000000..d48ebc5
--- /dev/null
@@ -0,0 +1,2 @@
+#require enum_fail2
+<<< __file__ >>>;
diff --git a/tests/plug/enum_fail3.gw b/tests/plug/enum_fail3.gw
new file mode 100644 (file)
index 0000000..8379ec6
--- /dev/null
@@ -0,0 +1,2 @@
+#require enum_fail3
+<<< __file__ >>>;
index d99718ce8a0ff7df29b2df81a60deaf8bea64dd4..67843c25b69c216bb55cf20dfcc541367590d454 100644 (file)
@@ -1,3 +1,4 @@
+#require extend_array
 var ArrayExt a;
 <<< a >>>;
 <<< a.size() >>>;
diff --git a/tests/plug/fail_on_next_arg.gw b/tests/plug/fail_on_next_arg.gw
new file mode 100644 (file)
index 0000000..3bb8dae
--- /dev/null
@@ -0,0 +1,2 @@
+#require fail_on_next_arg
+<<< __file__ >>>;
diff --git a/tests/plug/fail_on_next_arg2.gw b/tests/plug/fail_on_next_arg2.gw
new file mode 100644 (file)
index 0000000..fc189c8
--- /dev/null
@@ -0,0 +1,2 @@
+#require fail_on_next_arg2
+<<< __file__ >>>;
index 0acefb39c2ee03f12ccfe39a368affee040d630b..a427bc71e964317a1131698d2b45c79813a0b479 100644 (file)
@@ -1,3 +1,4 @@
+#require fptr
 fun void test(){ <<< "test" >>>; }
 var PtrType ptr;
 test();
@@ -10,4 +11,3 @@ FuncTypedef.test_func();
 var FuncTypedef.PtrType _ptr;
 <<< FuncTypedef.ptr >>>;
 FuncTypedef.ptr();
-
diff --git a/tests/plug/fptr_tmpl.gw b/tests/plug/fptr_tmpl.gw
new file mode 100644 (file)
index 0000000..c67df8a
--- /dev/null
@@ -0,0 +1,2 @@
+#require fptr_tmpl
+<<< __file__ >>>;
diff --git a/tests/plug/fptr_tmpl_fail.gw b/tests/plug/fptr_tmpl_fail.gw
new file mode 100644 (file)
index 0000000..24e8571
--- /dev/null
@@ -0,0 +1,2 @@
+#require fptr_tmpl_fail
+<<< __file__ >>>;
diff --git a/tests/plug/func_fail.gw b/tests/plug/func_fail.gw
new file mode 100644 (file)
index 0000000..5edc24f
--- /dev/null
@@ -0,0 +1,2 @@
+#require func_fail
+<<< __file__ >>>;
diff --git a/tests/plug/func_fail2.gw b/tests/plug/func_fail2.gw
new file mode 100644 (file)
index 0000000..c2dc943
--- /dev/null
@@ -0,0 +1,2 @@
+#require func_fail2
+<<< __file__ >>>;
diff --git a/tests/plug/func_fail3.gw b/tests/plug/func_fail3.gw
new file mode 100644 (file)
index 0000000..331e470
--- /dev/null
@@ -0,0 +1,2 @@
+#require func_fail3
+<<< __file__ >>>;
diff --git a/tests/plug/func_fail4.gw b/tests/plug/func_fail4.gw
new file mode 100644 (file)
index 0000000..631c2a1
--- /dev/null
@@ -0,0 +1,2 @@
+#require func_fail4
+<<< __file__ >>>;
diff --git a/tests/plug/func_subscript_not_empty.gw b/tests/plug/func_subscript_not_empty.gw
new file mode 100644 (file)
index 0000000..cfeeab1
--- /dev/null
@@ -0,0 +1,2 @@
+#require func_subscript_not_empty
+<<< __file__ >>>;
index 5916a402c734bfe9cedee4df9a0ee28e4c06b30f..83974670a5362e4e122a1816ad3c63dd108885bb 100644 (file)
@@ -1,2 +1,3 @@
+#require func_tmpl
 test:[int](1);
 test(1);
diff --git a/tests/plug/func_tmpl_fail.gw b/tests/plug/func_tmpl_fail.gw
new file mode 100644 (file)
index 0000000..1979793
--- /dev/null
@@ -0,0 +1,2 @@
+#require func_tmpl_fail
+<<< __file__ >>>;
diff --git a/tests/plug/func_too_many_arg.gw b/tests/plug/func_too_many_arg.gw
new file mode 100644 (file)
index 0000000..b011054
--- /dev/null
@@ -0,0 +1,2 @@
+#require func_too_many_arg
+<<< __file__ >>>;
index c4a561228b6d6ef187c296213fb9ac940336b52d..607031798cc5f5656dcd17ae75d6fd1d6d240552 100644 (file)
@@ -1,3 +1,3 @@
+#require global_func
 <<< test >>>;
 <<< 1 => test >>>;
-
index 3e401b0c3af2f749df96a57e9a972f51c7416bf6..91f4674f056259daa96f7ff10339db421a5a2ba1 100644 (file)
@@ -1,3 +1,4 @@
+#require global_var
 <<< i >>>;
 <<< "other test" => i >>>;
 <<< 12 => f >>>;
diff --git a/tests/plug/invalid_arg.gw b/tests/plug/invalid_arg.gw
new file mode 100644 (file)
index 0000000..9223e11
--- /dev/null
@@ -0,0 +1,2 @@
+#require invalid_arg
+<<< __file__ >>>;
diff --git a/tests/plug/invalid_array.gw b/tests/plug/invalid_array.gw
new file mode 100644 (file)
index 0000000..0fd80fb
--- /dev/null
@@ -0,0 +1,2 @@
+#require invalid_array
+<<< __file__ >>>;
diff --git a/tests/plug/invalid_func.gw b/tests/plug/invalid_func.gw
new file mode 100644 (file)
index 0000000..2fc7ae7
--- /dev/null
@@ -0,0 +1,2 @@
+#require invalid_func
+<<< __file__ >>>;
diff --git a/tests/plug/invalid_names.gw b/tests/plug/invalid_names.gw
new file mode 100644 (file)
index 0000000..6bc7172
--- /dev/null
@@ -0,0 +1,2 @@
+#require invalid_names
+<<< __file__ >>>;
diff --git a/tests/plug/invalid_names0.gw b/tests/plug/invalid_names0.gw
new file mode 100644 (file)
index 0000000..76e1027
--- /dev/null
@@ -0,0 +1,2 @@
+#require invalid_names0
+<<< __file__ >>>;
diff --git a/tests/plug/invalid_names1.gw b/tests/plug/invalid_names1.gw
new file mode 100644 (file)
index 0000000..b2dc86c
--- /dev/null
@@ -0,0 +1,2 @@
+#require invalid_names1
+<<< __file__ >>>;
diff --git a/tests/plug/invalid_names2.gw b/tests/plug/invalid_names2.gw
new file mode 100644 (file)
index 0000000..6be95ab
--- /dev/null
@@ -0,0 +1,2 @@
+#require invalid_names2
+<<< __file__ >>>;
diff --git a/tests/plug/invalid_names3.gw b/tests/plug/invalid_names3.gw
new file mode 100644 (file)
index 0000000..234a3b4
--- /dev/null
@@ -0,0 +1,2 @@
+#require invalid_names3
+<<< __file__ >>>;
diff --git a/tests/plug/invalid_type1.gw b/tests/plug/invalid_type1.gw
new file mode 100644 (file)
index 0000000..0e7cd1f
--- /dev/null
@@ -0,0 +1,2 @@
+#require invalid_type1
+<<< __file__ >>>;
diff --git a/tests/plug/invalid_type2.gw b/tests/plug/invalid_type2.gw
new file mode 100644 (file)
index 0000000..62325e5
--- /dev/null
@@ -0,0 +1,2 @@
+#require invalid_type2
+<<< __file__ >>>;
diff --git a/tests/plug/invalid_type3.gw b/tests/plug/invalid_type3.gw
new file mode 100644 (file)
index 0000000..d7413bb
--- /dev/null
@@ -0,0 +1,2 @@
+#require invalid_type3
+<<< __file__ >>>;
diff --git a/tests/plug/mk_type_array.gw b/tests/plug/mk_type_array.gw
new file mode 100644 (file)
index 0000000..28fda93
--- /dev/null
@@ -0,0 +1,2 @@
+#require mk_type_array
+<<< __file__ >>>;
diff --git a/tests/plug/no_import.gw b/tests/plug/no_import.gw
new file mode 100644 (file)
index 0000000..dd07581
--- /dev/null
@@ -0,0 +1,2 @@
+#require no_import
+<<< __file__ >>>;
diff --git a/tests/plug/not_importing.gw b/tests/plug/not_importing.gw
new file mode 100644 (file)
index 0000000..933e07b
--- /dev/null
@@ -0,0 +1,2 @@
+#require not_importing
+<<< __file__ >>>;
index ddbb3b6a2d8045d5734fe2c774cd61a4b31a035f..9cd444064d431c894698202224fe1cf67835dc83 100644 (file)
@@ -1,3 +1,3 @@
-#! [contains] already imported
 #require op_already_imported
+#! [contains] already imported
 <<< 1 >>>;
diff --git a/tests/plug/pass.gw b/tests/plug/pass.gw
new file mode 100644 (file)
index 0000000..233e1f2
--- /dev/null
@@ -0,0 +1,2 @@
+#require pass
+<<< __file__ >>>;
index ae20073349ddb2f15e56096b18bdd20b9d3896ef..0eec0eba09c40504cb54a2af4106bf087f39579d 100644 (file)
@@ -1 +1,2 @@
+#require specialid_emit
 <<< testid >>>;
index dc3f911a511e3bccf500d338e930d16079c82853..f94a3bd50fe775d83d6f0e6b340b7d106fde76e7 100644 (file)
@@ -1,2 +1,3 @@
+#require static_string
 #!<<< StaticString.self >>>;
 <<< self >>>;
diff --git a/tests/plug/str2decl.gw b/tests/plug/str2decl.gw
new file mode 100644 (file)
index 0000000..9532ca7
--- /dev/null
@@ -0,0 +1,2 @@
+#require str2decl
+<<< __file__ >>>;
diff --git a/tests/plug/str2list_fail.gw b/tests/plug/str2list_fail.gw
new file mode 100644 (file)
index 0000000..57d8127
--- /dev/null
@@ -0,0 +1,2 @@
+#require str2list_fail
+<<< __file__ >>>;
diff --git a/tests/plug/template_arg.gw b/tests/plug/template_arg.gw
new file mode 100644 (file)
index 0000000..b65012f
--- /dev/null
@@ -0,0 +1,2 @@
+#require template_arg
+<<< __file__ >>>;
index cbc5f36ee81a9b5faf1dbe41ab9c84314e847fc1..849d12aae3b4c1ea60d0d4f591c3b2a81e086baa 100644 (file)
@@ -1,3 +1,4 @@
+#require trig
 var Trig trig => dac;
 adc :=> trig;
 adc :=< trig;
index ea3d603e49c92afd93d0c109efa092af6a3a2824..8a3ec9b26eef4c90b9b9a10587af8e5fea857f44 100644 (file)
@@ -1,3 +1,4 @@
+#require typedef
 var Typedef t;
 #!fun int test(int i) { <<< i >>>; }
 #!test @=> t;
diff --git a/tests/plug/typedef_fail.gw b/tests/plug/typedef_fail.gw
new file mode 100644 (file)
index 0000000..c1b0f5e
--- /dev/null
@@ -0,0 +1,2 @@
+#require typedef_fail
+<<< __file__ >>>;
diff --git a/tests/plug/typedef_tmpl.gw b/tests/plug/typedef_tmpl.gw
new file mode 100644 (file)
index 0000000..c98fc08
--- /dev/null
@@ -0,0 +1,2 @@
+#require typedef_tmpl
+<<< __file__ >>>;
diff --git a/tests/plug/ugen_connect.gw b/tests/plug/ugen_connect.gw
new file mode 100644 (file)
index 0000000..cf2a999
--- /dev/null
@@ -0,0 +1,2 @@
+#require ugen_connect
+<<< __file__ >>>;
index d32885dec09ee45a65f92eeccc6158b2b200f7c0..591ef1cf493289785688478c2179716d9ddbcc66 100644 (file)
@@ -1,3 +1,4 @@
+#require union
 var Union u;
 <<< u.i >>>;
 <<< 12 => u.f >>>;
diff --git a/tests/plug/union_fail_exp.gw b/tests/plug/union_fail_exp.gw
new file mode 100644 (file)
index 0000000..27d1a69
--- /dev/null
@@ -0,0 +1,2 @@
+#require union_fail_exp
+<<< __file__ >>>;
diff --git a/tests/plug/union_member.gw b/tests/plug/union_member.gw
new file mode 100644 (file)
index 0000000..a743ff4
--- /dev/null
@@ -0,0 +1,2 @@
+#require union_member
+<<< __file__ >>>;
index c5ad1d057a0bb7af5eb80e9b742bc4e3561bcf53..38216c55453331253e79211611249da42f3e1e8e 100644 (file)
@@ -1,2 +1,3 @@
+#require union_name
 <<< my_union >>>;
 <<<my_union.i>>>;
index 5d6c0c60103d037d1c76bae23107e4fddd38dcc4..a7ac5d4dc30b26bcb0854fc4b39c306af7a4ea2a 100644 (file)
@@ -1,2 +1,3 @@
+#require union_tmpl
 <<< var U:[Event] u>>>;
 <<< u.a >>>;
diff --git a/tests/plug/union_tmpl_fail.gw b/tests/plug/union_tmpl_fail.gw
new file mode 100644 (file)
index 0000000..c70c688
--- /dev/null
@@ -0,0 +1,2 @@
+#require union_tmpl_fail
+<<< __file__ >>>;
diff --git a/tests/plug/union_tmpl_fail2.gw b/tests/plug/union_tmpl_fail2.gw
new file mode 100644 (file)
index 0000000..06566c7
--- /dev/null
@@ -0,0 +1,2 @@
+#require union_tmpl_fail2
+<<< __file__ >>>;
diff --git a/tests/plug/union_tmpl_fail3.gw b/tests/plug/union_tmpl_fail3.gw
new file mode 100644 (file)
index 0000000..b888fa1
--- /dev/null
@@ -0,0 +1,2 @@
+#require union_tmpl_fail3
+<<< __file__ >>>;
index 3213c303cfdb70ed10c56d598768a30640f3fff8..48f8b5758200c06a95a33cf42bae6daf699034b0 100644 (file)
@@ -1,3 +1,4 @@
+#require variadic
 <<< "test builtin variadic fun" >>>;
 var Variadic v;
 "iiii" => var string format;
index 31429431ad344e5f86b4d94c60ec606391d614c0..85078c1a15c6b3a4d7c8aedb69427de28d4a7553 100644 (file)
@@ -1,2 +1,3 @@
+#require vm_remove
 test(12);
 test(1);