[plt-translators] english-string-constants.rkt update

From: Philippe Meunier (meunier at ccs.neu.edu)
Date: Fri Sep 17 10:00:24 EDT 2010

commit 01a41a812e83d0fb3a31940de0b52504ac4bbdb6
Author: Jay McCarthy <jay at racket-lang.org>
Date:   Thu Sep 16 20:48:30 2010 -0600

    Closing pr11216. Adding one armed check-error to teaching languages.
    
    [It will not bother me if we revert this commit. I liked SK's idea and found it easy to implement. I wonder if others will be worried that it is easy to unintentionally leave off the second argument to check-error. I also wonder if it is problematic to add new string constants, like I've done.]
    
    Here is an example:
    
    (check-error (/ 1 0) "/: division by zero")
    (check-error (/ 1 0) "divide by zero")
    (check-error (/ 1 0))
    (check-error 1)
    
    Here is the output:
    
    Ran 4 tests.
    2 of the 4 tests failed.
    
    No signature violations.
    
    Check failures:
    	check-error encountered the following error instead of the expected divide by zero
       :: /: division by zero
    in ex.rkt, line 2, column 0
    	check-error expected an error, but instead received the value 1.
    in ex.rkt, line 4, column 0
============================================================
diff --git a/collects/string-constants/english-string-constants.rkt b/collects/string-constants/english-string-constants.rkt
index 3c52beb..79b6c90 100644
--- a/collects/string-constants/english-string-constants.rkt
+++ b/collects/string-constants/english-string-constants.rkt
@@ -1439,6 +1439,8 @@ please adhere to these guidelines:
    "check-error encountered the following error instead of the expected ~a~n   :: ~a")
   (test-engine-expected-error-error
    "check-error expected the following error, but instead received the value ~F.~n ~a")
+  (test-engine-expected-an-error-error
+   "check-error expected an error, but instead received the value ~F.")
   ;; members are appended to the message
   (test-engine-not-mem-error "Actual value ~F differs from all given members in ")
   (test-engine-not-range-error "Actual value ~F is not between ~F and ~F, inclusive.")



Posted on the translators mailing list.