Add tests for error message pruning.

This commit is contained in:
Vincent St-Amour 2013-09-04 11:12:01 -04:00
parent fef4b28b88
commit 86c87f5fda
3 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,11 @@
#;
(exn-pred #px"^((?!Integer).)+$")
#lang typed/racket
;; Tests that function type pruning in errors is working. If the string
;; "Integer" shows up the error (which should be about Number), then
;; pruning is broken.
;; Because `exn-pred' only checks the first line of the error, only one
;; error expression per file (otherwise, the first line is a summary).
(add1 'foo1)

View File

@ -0,0 +1,11 @@
#;
(exn-pred #px"^((?!Integer).)+$")
#lang typed/racket
;; Tests that function type pruning in errors is working. If the string
;; "Integer" shows up the error (which should be about Number), then
;; pruning is broken.
;; Because `exn-pred' only checks the first line of the error, only one
;; error expression per file (otherwise, the first line is a summary).
(+ 'foo1 3)

View File

@ -0,0 +1,11 @@
#;
(exn-pred #px"^((?!Integer).)+$")
#lang typed/racket
;; Tests that function type pruning in errors is working. If the string
;; "Integer" shows up the error (which should be about Number), then
;; pruning is broken.
;; Because `exn-pred' only checks the first line of the error, only one
;; error expression per file (otherwise, the first line is a summary).
(+ 'foo1 "a")