about summary refs log tree commit diff stats
path: root/js/scripting-lang/scratch_tests/test_functions.txt
diff options
context:
space:
mode:
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_functions.txt')
-rw-r--r--js/scripting-lang/scratch_tests/test_functions.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_functions.txt b/js/scripting-lang/scratch_tests/test_functions.txt
new file mode 100644
index 0000000..8e3ea43
--- /dev/null
+++ b/js/scripting-lang/scratch_tests/test_functions.txt
@@ -0,0 +1,15 @@
+/* Test individual functions */
+f1 : x -> x + 1;
+f2 : x -> x * 2;
+f3 : x -> x - 1;
+
+test1 : f1 10;
+test2 : f2 10;
+test3 : f3 10;
+
+..out "f1(10) = ";
+..out test1;
+..out "f2(10) = ";
+..out test2;
+..out "f3(10) = ";
+..out test3; 
\ No newline at end of file