]> Nishi Git Mirror - gwion.git/commitdiff
revert and test
authorfennecdjay <astor.jeremie@wanadoo.fr>
Tue, 9 Jul 2019 17:31:21 +0000 (19:31 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Tue, 9 Jul 2019 17:31:21 +0000 (19:31 +0200)
tests/import/test.log
tests/tree/array_cast.gw [new file with mode: 0644]
tests/tree/did_you_mean_type.gw [new file with mode: 0644]
tests/tree/push_func.gw [new file with mode: 0644]
tests/tree/reddit.gw [new file with mode: 0644]
tests/tree/template_fptr.gw [new file with mode: 0644]

index b584940e2fb0c9676a5d98e096ec26bdb7003d9d..8557b3a477e8e437e3df4916790301647272c67a 100644 (file)
@@ -11398,3 +11398,45 @@ global_func.gw ==22565== Memcheck, a memory error detector
 ==4349== 
 ==4349== For counts of detected and suppressed errors, rerun with: -v
 ==4349== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+/dev/null ==13821== Memcheck, a memory error detector
+==13821== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
+==13821== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
+==13821== Command: ./../../gwion -p. -d dummy /dev/null
+==13821== Parent PID: 13795
+==13821== 
+==13821== 
+==13821== HEAP SUMMARY:
+==13821==     in use at exit: 928 bytes in 10 blocks
+==13821==   total heap usage: 974 allocs, 964 frees, 7,596,796 bytes allocated
+==13821== 
+==13821== LEAK SUMMARY:
+==13821==    definitely lost: 928 bytes in 10 blocks
+==13821==    indirectly lost: 0 bytes in 0 blocks
+==13821==      possibly lost: 0 bytes in 0 blocks
+==13821==    still reachable: 0 bytes in 0 blocks
+==13821==         suppressed: 0 bytes in 0 blocks
+==13821== Rerun with --leak-check=full to see details of leaked memory
+==13821== 
+==13821== For counts of detected and suppressed errors, rerun with: -v
+==13821== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+/dev/null ==14729== Memcheck, a memory error detector
+==14729== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
+==14729== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
+==14729== Command: ./../../gwion -p. -d dummy /dev/null
+==14729== Parent PID: 13795
+==14729== 
+==14729== 
+==14729== HEAP SUMMARY:
+==14729==     in use at exit: 576 bytes in 9 blocks
+==14729==   total heap usage: 956 allocs, 947 frees, 7,590,612 bytes allocated
+==14729== 
+==14729== LEAK SUMMARY:
+==14729==    definitely lost: 576 bytes in 9 blocks
+==14729==    indirectly lost: 0 bytes in 0 blocks
+==14729==      possibly lost: 0 bytes in 0 blocks
+==14729==    still reachable: 0 bytes in 0 blocks
+==14729==         suppressed: 0 bytes in 0 blocks
+==14729== Rerun with --leak-check=full to see details of leaked memory
+==14729== 
+==14729== For counts of detected and suppressed errors, rerun with: -v
+==14729== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
diff --git a/tests/tree/array_cast.gw b/tests/tree/array_cast.gw
new file mode 100644 (file)
index 0000000..1b7c437
--- /dev/null
@@ -0,0 +1,2 @@
+typedef int[2] _int;
+new _int $ _int;
diff --git a/tests/tree/did_you_mean_type.gw b/tests/tree/did_you_mean_type.gw
new file mode 100644 (file)
index 0000000..73b0459
--- /dev/null
@@ -0,0 +1,4 @@
+class C {
+  <<<this.aa>>>;
+  int a;
+}
diff --git a/tests/tree/push_func.gw b/tests/tree/push_func.gw
new file mode 100644 (file)
index 0000000..2f7957f
--- /dev/null
@@ -0,0 +1 @@
+me.exit;
diff --git a/tests/tree/reddit.gw b/tests/tree/reddit.gw
new file mode 100644 (file)
index 0000000..9b4fd25
--- /dev/null
@@ -0,0 +1,8 @@
+
+#! basic math printed out (note the space after '<<<' and before '>>>'
+<<<  1 + 2 >>>;
+
+#! define and operator
+operator $@+-*%~<>^&!= void (int i, int j) { <<< i, " ", j >>>; }
+
+1 $@+-*%~<>^&!= 2;
diff --git a/tests/tree/template_fptr.gw b/tests/tree/template_fptr.gw
new file mode 100644 (file)
index 0000000..3a130d9
--- /dev/null
@@ -0,0 +1,11 @@
+typedef int ptr_t<~A~>(A);
+ptr_t ptr;
+<<<ptr>>>;
+
+fun int test<~A~>(A a) { <<< a >>>; }
+test @=> ptr;
+<<< ptr >>>;
+#!3;
+#!3 => test;
+ptr<~int~>(2);
+ptr<~float~>(2.3);