Commit 14422e0312

Andrew Kelley <superjoe30@gmail.com>
2016-12-19 06:53:18
organize tests
1 parent 6b2d067
test/cases3/disabled_export.zig
@@ -1,8 +0,0 @@
-export fn disabledExternFn() {
-    @setFnVisible(this, false);
-}
-
-fn callDisabledExternFn() {
-    @setFnTest(this);
-    disabledExternFn();
-}
test/cases3/empty_fn_with_comments.zig
@@ -1,6 +0,0 @@
-// normal comment
-/// this is a documentation comment
-/// doc comment line 2
-fn emptyFunctionWithComments() {
-    @setFnTest(this);
-}
test/cases3/generics.zig
@@ -40,6 +40,16 @@ fn fnWithInlineArgs() {
     assert(sameButWithFloats(0.43, 0.49) == 0.49);
 }
 
+fn inlinedLoop() {
+    @setFnTest(this);
+
+    inline var i = 0;
+    inline var sum = 0;
+    inline while (i <= 5; i += 1)
+        sum += i;
+    assert(sum == 15);
+}
+
 
 // TODO const assert = @import("std").debug.assert;
 fn assert(ok: bool) {
test/cases3/inlined_loop.zig
@@ -1,16 +0,0 @@
-
-fn inlinedLoop() {
-    @setFnTest(this);
-
-    inline var i = 0;
-    inline var sum = 0;
-    inline while (i <= 5; i += 1)
-        sum += i;
-    assert(sum == 15);
-}
-
-// TODO const assert = @import("std").debug.assert;
-fn assert(ok: bool) {
-    if (!ok)
-        @unreachable();
-}
test/cases3/misc.zig
@@ -1,3 +1,20 @@
+// normal comment
+/// this is a documentation comment
+/// doc comment line 2
+fn emptyFunctionWithComments() {
+    @setFnTest(this);
+}
+
+export fn disabledExternFn() {
+    @setFnVisible(this, false);
+}
+
+fn callDisabledExternFn() {
+    @setFnTest(this);
+
+    disabledExternFn();
+}
+
 fn intTypeBuiltin() {
     @setFnTest(this);
 
test/self_hosted3.zig
@@ -1,7 +1,4 @@
 // TODO '_' identifier for unused variable bindings
-const test_empty_fn_with_comments = @import("cases3/empty_fn_with_comments.zig");
-const test_disabled_export = @import("cases3/disabled_export.zig");
-const test_inlined_loop = @import("cases3/inlined_loop.zig");
 const test_misc = @import("cases3/misc.zig");
 const test_switch = @import("cases3/switch.zig");
 const test_error = @import("cases3/error.zig");