about summary refs log tree commit diff stats
path: root/js/scripting-lang/scratch_tests/test_when_simple.txt
diff options
context:
space:
mode:
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_when_simple.txt')
-rw-r--r--js/scripting-lang/scratch_tests/test_when_simple.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_when_simple.txt b/js/scripting-lang/scratch_tests/test_when_simple.txt
new file mode 100644
index 0000000..3180d51
--- /dev/null
+++ b/js/scripting-lang/scratch_tests/test_when_simple.txt
@@ -0,0 +1,7 @@
+/* Test simple when expression */
+factorial : n -> 
+  when n is
+    0 then 1
+    _ then n * (factorial (n - 1));
+
+..out "when expression created successfully"; 
\ No newline at end of file