1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

Adapt srfi-9.test to error reporting improvements; update copyright dates.

* module/srfi/srfi-9.scm: Add 2013 copyright date.

* test-suite/tests/srfi-9.test: Adapt to recent error reporting
  improvements to procedures defined by 'define-tagged-inlinable'.
This commit is contained in:
Mark H Weaver 2013-09-12 18:14:54 -04:00
parent 89ffbb1c2e
commit 361553b49d
2 changed files with 9 additions and 4 deletions

View file

@ -1,6 +1,7 @@
;;; srfi-9.scm --- define-record-type
;; Copyright (C) 2001, 2002, 2006, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
;; Copyright (C) 2001, 2002, 2006, 2009, 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

View 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
@ -41,15 +42,18 @@
(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