From cedf24d8bda2439fa0b6de74a6fa4b8105d96004 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 31 Mar 2010 11:38:02 +0200 Subject: [PATCH] Add separate test file for GOOPS-less tests. * test-suite/tests/00-initial-env.test: New file. * test-suite/Makefile.am (SCM_TESTS): Add `tests/00-initial-env.test'. * test-suite/tests/numbers.test ("+")["wrong type argument"]: Move to `00-initial-env.test'. --- test-suite/Makefile.am | 3 +- test-suite/tests/00-initial-env.test | 44 ++++++++++++++++++++++++++++ test-suite/tests/numbers.test | 13 ++------ 3 files changed, 48 insertions(+), 12 deletions(-) create mode 100644 test-suite/tests/00-initial-env.test diff --git a/test-suite/Makefile.am b/test-suite/Makefile.am index ad8a8f771..afd206f2d 100644 --- a/test-suite/Makefile.am +++ b/test-suite/Makefile.am @@ -21,7 +21,8 @@ SUBDIRS = standalone -SCM_TESTS = tests/alist.test \ +SCM_TESTS = tests/00-initial-env.test \ + tests/alist.test \ tests/and-let-star.test \ tests/arbiters.test \ tests/arrays.test \ diff --git a/test-suite/tests/00-initial-env.test b/test-suite/tests/00-initial-env.test new file mode 100644 index 000000000..66d960f0b --- /dev/null +++ b/test-suite/tests/00-initial-env.test @@ -0,0 +1,44 @@ +;;;; 00-initial-env.test --- Roots. -*- mode: scheme; coding: utf-8; -*- +;;;; +;;;; Copyright (C) 2010 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 +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +(define-module (the-initial-env) + #:use-module (test-suite lib)) + +;;; A set of tests to run early. The file name is to have `check-guile' pick +;;; this test file first. + + +;;; +;;; Tests to be run when GOOPS is not loaded. +;;; + +(with-test-prefix "goopsless" + + (with-test-prefix "+ wrong type argument" + + ;; The following tests assume that `+' hasn't been turned into a generic + ;; and extended. Since the ECMAScript run-time library does exactly + ;; that, they must be run before `ecmascript.test'. + + (pass-if-exception "1st argument string" + exception:wrong-type-arg + (+ "1" 2)) + + (pass-if-exception "2nd argument bool" + exception:wrong-type-arg + (+ 1 #f)))) diff --git a/test-suite/tests/numbers.test b/test-suite/tests/numbers.test index 0c75d7159..3f2671207 100644 --- a/test-suite/tests/numbers.test +++ b/test-suite/tests/numbers.test @@ -1,5 +1,5 @@ ;;;; numbers.test --- tests guile's numbers -*- scheme -*- -;;;; Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2009 Free Software Foundation, Inc. +;;;; Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2009, 2010 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 @@ -2436,17 +2436,8 @@ (with-test-prefix "+" (pass-if "documented?" - (documented? +)) + (documented? +))) - (with-test-prefix "wrong type argument" - - (pass-if-exception "1st argument string" - exception:wrong-type-arg - (+ "1" 2)) - - (pass-if-exception "2nd argument bool" - exception:wrong-type-arg - (+ 1 #f)))) ;;; ;;; - ;;; -- 2.20.1