summaryrefslogtreecommitdiffstats
path: root/pigeonhole/tests/compile/errors/lexer.sieve
diff options
context:
space:
mode:
Diffstat (limited to 'pigeonhole/tests/compile/errors/lexer.sieve')
-rw-r--r--pigeonhole/tests/compile/errors/lexer.sieve68
1 files changed, 68 insertions, 0 deletions
diff --git a/pigeonhole/tests/compile/errors/lexer.sieve b/pigeonhole/tests/compile/errors/lexer.sieve
new file mode 100644
index 0000000..9675db1
--- /dev/null
+++ b/pigeonhole/tests/compile/errors/lexer.sieve
@@ -0,0 +1,68 @@
+/*
+ * Lexer tests
+ *
+ * Total errors: 8 (+1 = 9)
+ */
+
+/*
+ * Number limits
+ */
+
+# 1: Number too large
+if size :under 18446744073709551617 {
+ stop;
+}
+
+# 2: Number too large
+if size :under 18446744073709551616 {
+ stop;
+}
+
+# 3: Number too large
+if size :over 180143985094819840k {
+ stop;
+}
+
+# 4: Number too large
+if size :over 1006622342342296M {
+ stop;
+}
+
+# 5: Number too large
+if size :over 34359738368G {
+ stop;
+}
+
+# 6: Number far too large
+if size :over 49834598293485814273947921734981723971293741923 {
+ stop;
+}
+
+# Not an error
+if size :under 18446744073709551615 {
+ stop;
+}
+
+# Not an error
+if size :under 18446744073709551614 {
+ stop;
+}
+
+# Not an error
+if size :under 800G {
+ stop;
+}
+
+/*
+ * Identifier limits
+ */
+
+# 7: Identifier too long
+if this_is_a_rediculously_long_test_name {
+ stop;
+}
+
+# 8: Identifier way too long
+if test :this_is_an_even_more_rediculously_long_tagged_argument_name {
+ stop;
+}