summaryrefslogtreecommitdiff
path: root/testsuite/tests/typing-warnings/application.ml
diff options
context:
space:
mode:
authorNicolás Ojeda Bär <n.oje.bar@gmail.com>2018-08-10 12:05:39 +0200
committerNicolás Ojeda Bär <n.oje.bar@gmail.com>2018-08-16 13:10:27 +0530
commit1fcb9f5b27803a9a27a33ab03227b534bad6654d (patch)
treeb451e81c207891f54e9dec00d694c83866a7c1a5 /testsuite/tests/typing-warnings/application.ml
parentdf7d0e620364b9922f09cfc5676108ad6c4a4c49 (diff)
downloadocaml-1fcb9f5b27803a9a27a33ab03227b534bad6654d.tar.gz
Port typing-warnings/application to expect
Diffstat (limited to 'testsuite/tests/typing-warnings/application.ml')
-rw-r--r--testsuite/tests/typing-warnings/application.ml21
1 files changed, 20 insertions, 1 deletions
diff --git a/testsuite/tests/typing-warnings/application.ml b/testsuite/tests/typing-warnings/application.ml
index 0232adc947..31715bd7c6 100644
--- a/testsuite/tests/typing-warnings/application.ml
+++ b/testsuite/tests/typing-warnings/application.ml
@@ -1,10 +1,29 @@
(* TEST
flags = " -w A -strict-sequence "
- * toplevel
+ * expect
*)
(* Ignore OCAMLRUNPARAM=b to be reproducible *)
Printexc.record_backtrace false;;
+[%%expect {|
+- : unit = ()
+|}]
let _ = ignore (+);;
+[%%expect {|
+Line 1, characters 15-18:
+ let _ = ignore (+);;
+ ^^^
+Warning 5: this function application is partial,
+maybe some arguments are missing.
+- : unit = ()
+|}]
+
let _ = raise Exit 3;;
+[%%expect {|
+Line 1, characters 19-20:
+ let _ = raise Exit 3;;
+ ^
+Warning 20: this argument will not be used by the function.
+Exception: Stdlib.Pervasives.Exit.
+|}]