about summary refs log tree commit diff stats
path: root/apps/factorial.mu
diff options
context:
space:
mode:
Diffstat (limited to 'apps/factorial.mu')
-rw-r--r--apps/factorial.mu14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/factorial.mu b/apps/factorial.mu
index 164a7d45..6117d153 100644
--- a/apps/factorial.mu
+++ b/apps/factorial.mu
@@ -7,18 +7,18 @@ fn main args: (addr array kernel-string) -> exit-status/ebx: int {
   var tmp/ecx: int <- length a
   $main-body: {
     compare tmp, 1
-    # if (len(args) != 1) run-tests()
-    {
-      break-if-=
-      run-tests
-      exit-status <- copy 0
-      break $main-body
-    }
     # if (len(args) == 1) factorial(5)
     {
       break-if-!=
       var tmp/eax: int <- factorial 5
       exit-status <- copy tmp
+      break $main-body
+    }
+    # if (len(args) != 1) run-tests()
+    {
+      break-if-=
+      run-tests
+      exit-status <- copy 0
     }
   }
 }