about summary refs log tree commit diff stats
path: root/js/scripting-lang/scratch_tests/test_grade_comparison.txt
diff options
context:
space:
mode:
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_grade_comparison.txt')
-rw-r--r--js/scripting-lang/scratch_tests/test_grade_comparison.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_grade_comparison.txt b/js/scripting-lang/scratch_tests/test_grade_comparison.txt
new file mode 100644
index 0000000..39df2f8
--- /dev/null
+++ b/js/scripting-lang/scratch_tests/test_grade_comparison.txt
@@ -0,0 +1,15 @@
+/* Test grade function with comparison patterns */
+grade : score -> 
+  when score is
+    score >= 90 then "A"
+    score >= 80 then "B"
+    score >= 70 then "C"
+    _  then "F";
+
+result1 : grade 95;
+result2 : grade 85;
+result3 : grade 65;
+
+..out result1;
+..out result2;
+..out result3; 
\ No newline at end of file