summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2009-01-15 00:05:41 +0100
committerGuillaume Seguin <guillaume@segu.in>2009-01-15 00:05:41 +0100
commitc8118e8227b684b76b5933f24631bef594300718 (patch)
treedf8de896e67d996c397b007172c7b5c667e7a540
parent338f5a08c0779cfddd60f5b0fe5f544e896a2b3f (diff)
downloadpetitcaml-c8118e8227b684b76b5933f24631bef594300718.tar.gz
petitcaml-c8118e8227b684b76b5933f24631bef594300718.tar.bz2
[petitcaml] Add test for integer overflow and update tests runner
-rw-r--r--runtests.py6
-rw-r--r--tests/lexing/integer-overflow.ml6
2 files changed, 11 insertions, 1 deletions
diff --git a/runtests.py b/runtests.py
index ae688b7..9e2abaa 100644
--- a/runtests.py
+++ b/runtests.py
@@ -27,7 +27,11 @@ def run_test(test_file):
f.close()
expected_return_code = int(lines[1][13])
if expected_return_code != 0:
- expected_error = lines[3] + lines[4]
+ expected_error = ""
+ i = 3
+ while not lines[i].startswith("*)"):
+ expected_error += lines[i]
+ i += 1
base_command = "./petit-caml %s" % test_file
test_assembly = False
if "lexing" in test_file or "parsing" in test_file:
diff --git a/tests/lexing/integer-overflow.ml b/tests/lexing/integer-overflow.ml
new file mode 100644
index 0000000..30478dd
--- /dev/null
+++ b/tests/lexing/integer-overflow.ml
@@ -0,0 +1,6 @@
+(*
+ return : 1
+ output :
+Erreur dans l'analyse lexicale (entier invalide)
+*)
+let _ = 100000000000