From 62ed3710b74b045578b5243d7d6ad74eb7efba91 Mon Sep 17 00:00:00 2001 From: Dirk Herrmann Date: Mon, 24 May 2004 04:01:06 +0000 Subject: [PATCH] * tests/goops.test: Wrap tests in module (test-suite test-). Remove calls to deprecated macro `undefine'. --- test-suite/ChangeLog | 6 ++++++ test-suite/tests/goops.test | 33 +++++++++++++++++---------------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/test-suite/ChangeLog b/test-suite/ChangeLog index e9182f1a1..3514ca367 100644 --- a/test-suite/ChangeLog +++ b/test-suite/ChangeLog @@ -1,3 +1,9 @@ +2004-05-24 Dirk Herrmann + + * tests/goops.test: Wrap tests in module (test-suite + test-). Remove calls to deprecated macro + `undefine'. + 2004-05-10 Marius Vollmer * tests/numbers.test (number->string): Added tests for diff --git a/test-suite/tests/goops.test b/test-suite/tests/goops.test index a664000d6..1b1b82070 100644 --- a/test-suite/tests/goops.test +++ b/test-suite/tests/goops.test @@ -1,6 +1,6 @@ ;;;; goops.test --- test suite for GOOPS -*- scheme -*- ;;;; -;;;; Copyright (C) 2001, 2003 Free Software Foundation, Inc. +;;;; Copyright (C) 2001,2003,2004 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by @@ -17,7 +17,8 @@ ;;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330, ;;;; Boston, MA 02111-1307 USA -(use-modules (test-suite lib)) +(define-module (test-suite test-goops) + #:use-module (test-suite lib)) (pass-if "GOOPS loads" (false-if-exception @@ -128,10 +129,10 @@ (with-test-prefix "define-class" (pass-if "creating a new binding" - (eval '(define #f) (current-module)) - (eval '(undefine ) (current-module)) - (eval '(define-class ()) (current-module)) - (eval '(is-a? ) (current-module))) + (if (eval '(defined? ') (current-module)) + (throw 'unresolved)) + (eval '(define-class ()) (current-module)) + (eval '(is-a? ) (current-module))) (pass-if "overwriting a binding to a non-class" (eval '(define #f) (current-module)) @@ -154,11 +155,11 @@ (with-test-prefix "define-generic" (pass-if "creating a new top-level binding" - (eval '(define foo #f) (current-module)) - (eval '(undefine foo) (current-module)) - (eval '(define-generic foo) (current-module)) - (eval '(and (is-a? foo ) - (null? (generic-function-methods foo))) + (if (eval '(defined? 'foo-0) (current-module)) + (throw 'unresolved)) + (eval '(define-generic foo-0) (current-module)) + (eval '(and (is-a? foo-0 ) + (null? (generic-function-methods foo-0))) (current-module))) (pass-if "overwriting a top-level binding to a non-generic" @@ -181,11 +182,11 @@ (with-test-prefix "define-accessor" (pass-if "creating a new top-level binding" - (eval '(define foo #f) (current-module)) - (eval '(undefine foo) (current-module)) - (eval '(define-accessor foo) (current-module)) - (eval '(and (is-a? foo ) - (null? (generic-function-methods foo))) + (if (eval '(defined? 'foo-1) (current-module)) + (throw 'unresolved)) + (eval '(define-accessor foo-1) (current-module)) + (eval '(and (is-a? foo-1 ) + (null? (generic-function-methods foo-1))) (current-module))) (pass-if "overwriting a top-level binding to a non-accessor" -- 2.20.1