Merge remote-tracking branch 'origin/stable-2.0'
[bpt/guile.git] / test-suite / tests / srfi-9.test
index 6179b90..e1812bf 100644 (file)
@@ -1,7 +1,8 @@
 ;;;; srfi-9.test --- Test suite for Guile's SRFI-9 functions. -*- scheme -*-
 ;;;; Martin Grabmueller, 2001-05-10
 ;;;;
-;;;; Copyright (C) 2001, 2006, 2007, 2010, 2011, 2012 Free Software Foundation, Inc.
+;;;; Copyright (C) 2001, 2006, 2007, 2010, 2011, 2012,
+;;;;   2013 Free Software Foundation, Inc.
 ;;;; 
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
 
 (define b (make-bar 123 456))
 
+(define exception:syntax-error-wrong-num-args
+  (cons 'syntax-error "Wrong number of arguments"))
+
 (with-test-prefix "constructor"
 
   ;; Constructors are defined using `define-integrable', meaning that direct
   ;; calls as in `(make-foo)' lead to a compile-time psyntax error, hence the
   ;; distinction below.
 
-  (pass-if-exception "foo 0 args (inline)" exception:syntax-pattern-unmatched
+  (pass-if-exception "foo 0 args (inline)" exception:syntax-error-wrong-num-args
      (compile '(make-foo) #:env (current-module)))
-  (pass-if-exception "foo 2 args (inline)" exception:syntax-pattern-unmatched
+  (pass-if-exception "foo 2 args (inline)" exception:syntax-error-wrong-num-args
      (compile '(make-foo 1 2) #:env (current-module)))
 
   (pass-if-exception "foo 0 args" exception:wrong-num-args
         '(syntax-error set-fields
                        "\
 field paths (bar-i bar-j) and (bar-i foo-x) require one object \
-to belong to two different record types (:bar and foo)"
+to belong to two different record types (bar and foo)"
                        (set-fields s
                          ((bar-i foo-x) 1)
                          ((bar-i bar-j) 2)
@@ -630,7 +634,7 @@ to belong to two different record types (:bar and foo)"
                         (y foo-y set-foo-y)
                         (z foo-z set-foo-z))
 
-                      (define-immutable-record-type :bar
+                      (define-immutable-record-type bar
                         (make-bar i j)
                         bar?
                         (i bar-i)