From 5cce5e1230245f944bfdcbfdf61e1f4a3b1c7d77 Mon Sep 17 00:00:00 2001 From: Jan Moringen Date: Fri, 7 Dec 2018 19:57:15 +0100 Subject: [PATCH] tests: Less IN-PACKAGE noise --- tests/array.pure.lisp | 2 -- tests/assembler.pure.lisp | 5 ++--- tests/backq.impure.lisp | 2 -- tests/bad-code.pure.lisp | 2 -- tests/character.pure.lisp | 2 -- tests/clos.pure.lisp | 2 -- tests/coerce.pure.lisp | 2 -- tests/compiler-2.pure.lisp | 17 ++++++++--------- tests/compiler.impure.lisp | 2 -- tests/deprecation.internal.impure.lisp | 1 + tests/exhaust.impure.lisp | 1 + tests/float.pure.lisp | 2 -- tests/format.pure.lisp | 2 -- tests/hash.pure.lisp | 2 -- tests/pathnames.impure.lisp | 1 + tests/random.pure.lisp | 2 -- tests/seq.pure.lisp | 2 -- tests/setf.impure.lisp | 2 -- tests/threads.impure.lisp | 4 ++-- 19 files changed, 15 insertions(+), 40 deletions(-) diff --git a/tests/array.pure.lisp b/tests/array.pure.lisp index df697e2f2..268b6a497 100644 --- a/tests/array.pure.lisp +++ b/tests/array.pure.lisp @@ -9,8 +9,6 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -(in-package :cl-user) - ;;; Array initialization has complicated defaulting for :ELEMENT-TYPE, ;;; and both compile-time and run-time logic takes a whack at it. (with-test (:name (make-array :element-type :bug-126)) diff --git a/tests/assembler.pure.lisp b/tests/assembler.pure.lisp index 1295b775a..3cfc38247 100644 --- a/tests/assembler.pure.lisp +++ b/tests/assembler.pure.lisp @@ -11,9 +11,8 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -(in-package sb-vm) - -(use-package :test-util) +(cl:in-package "SB-VM") +(use-package "TEST-UTIL") ;; this is architecture-agnostic (defun test-assemble (inst expect) diff --git a/tests/backq.impure.lisp b/tests/backq.impure.lisp index ee083082f..f6fcde156 100644 --- a/tests/backq.impure.lisp +++ b/tests/backq.impure.lisp @@ -11,8 +11,6 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -(in-package "CL-USER") - (with-test (:name :backq-smoke-test) (assert (equalp (macroexpand '`#(() a #(#() nil x) #())) ''#(NIL A #(#() NIL X) #())))) diff --git a/tests/bad-code.pure.lisp b/tests/bad-code.pure.lisp index 9f54c0722..21b829b3e 100644 --- a/tests/bad-code.pure.lisp +++ b/tests/bad-code.pure.lisp @@ -1,5 +1,3 @@ -(in-package :cl-user) - (with-test (:name (make-array :bad-initial-contents)) (assert (nth-value 1 diff --git a/tests/character.pure.lisp b/tests/character.pure.lisp index 8000f7cda..0ed8a399e 100644 --- a/tests/character.pure.lisp +++ b/tests/character.pure.lisp @@ -11,8 +11,6 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -(cl:in-package :cl-user) - ;;; ANSI's specification of #'CHAR-NAME imposes these constraints. ;;; ;;; (Obviously, the numeric values in this test implicitly assume diff --git a/tests/clos.pure.lisp b/tests/clos.pure.lisp index bbac8e713..a9bf897d8 100644 --- a/tests/clos.pure.lisp +++ b/tests/clos.pure.lisp @@ -11,8 +11,6 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -(cl:in-package :cl-user) - ;;; not really a test for observable behaviour, but: make sure that ;;; all generic functions on startup have lambda lists known to the ;;; system, because some functionality (e.g. &key argument checking) diff --git a/tests/coerce.pure.lisp b/tests/coerce.pure.lisp index 86090b753..7ad91064f 100644 --- a/tests/coerce.pure.lisp +++ b/tests/coerce.pure.lisp @@ -9,8 +9,6 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -(in-package "CL-USER") - (with-test (:name (coerce complex :numeric-types)) (labels ((function/optimized (type rationalp) (checked-compile `(lambda (input) diff --git a/tests/compiler-2.pure.lisp b/tests/compiler-2.pure.lisp index 2b37206d2..a0b51f435 100644 --- a/tests/compiler-2.pure.lisp +++ b/tests/compiler-2.pure.lisp @@ -21,29 +21,28 @@ ;;;; This file strives to do better on all fronts: ;;;; the tests should be fast, named, and not noisy. -(cl:in-package :cl-user) - (enable-test-parallelism) (defun compiles-with-warning (lambda) (assert (nth-value 2 (checked-compile lambda :allow-warnings t)))) -(with-test (:name :position-derive-type) +(with-test (:name (position :derive-type)) (checked-compile '(lambda (x) (ash 1 (position (the (member a b c) x) #(a b c ))))) (checked-compile '(lambda (x) (ash 1 (position x #(a b c )))) :allow-style-warnings t) - (let ((f (compile nil '(lambda (x) (position x '(a b c d e f g h i j k l m)))))) + (let ((f (checked-compile '(lambda (x) + (position x '(a b c d e f g h i j k l m)))))) ;; test should be EQ, not EQL (assert (or (find (symbol-function 'eq) (ctu:find-code-constants f :type 'sb-kernel:simple-fun)) (ctu:find-named-callees f :name 'eq)))) - (let ((f (compile nil - '(lambda (x) - (position x '(a b c d e d c b a) :from-end t))))) - (assert (= (funcall f 'a) 8)) - (assert (= (funcall f 'b) 7)))) + (checked-compile-and-assert () + '(lambda (x) + (position x '(a b c d e d c b a) :from-end t)) + (('a) 8) + (('b) 7))) (with-test (:name (ldb :recognize-local-macros)) ;; Should not call %LDB diff --git a/tests/compiler.impure.lisp b/tests/compiler.impure.lisp index 089356d3b..ea9ca76ff 100644 --- a/tests/compiler.impure.lisp +++ b/tests/compiler.impure.lisp @@ -15,8 +15,6 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -(in-package :cl-user) - ;; The tests in this file do not work under the legacy interpreter. ;; They mostly do work in the fast interpreter, and are either harmless ;; or actually reasonable things to test. diff --git a/tests/deprecation.internal.impure.lisp b/tests/deprecation.internal.impure.lisp index d50ca3068..3e5d86b6d 100644 --- a/tests/deprecation.internal.impure.lisp +++ b/tests/deprecation.internal.impure.lisp @@ -9,6 +9,7 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. + ;;;; Helpers (defun test (kind name state make-body diff --git a/tests/exhaust.impure.lisp b/tests/exhaust.impure.lisp index d388e34b6..478c5d92f 100644 --- a/tests/exhaust.impure.lisp +++ b/tests/exhaust.impure.lisp @@ -13,6 +13,7 @@ #+interpreter (sb-ext:exit :code 104) + ;;; Prior to sbcl-0.7.1.38, doing something like (RECURSE), even in ;;; safe code, would crash the entire Lisp process. Then the soft ;;; stack checking was introduced, which checked (in safe code) for diff --git a/tests/float.pure.lisp b/tests/float.pure.lisp index bf41f0a8d..bdebcde9f 100644 --- a/tests/float.pure.lisp +++ b/tests/float.pure.lisp @@ -11,8 +11,6 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -(cl:in-package :cl-user) - (with-test (:name (:infinities :comparison)) (dolist (ifnis (list (cons single-float-positive-infinity single-float-negative-infinity) diff --git a/tests/format.pure.lisp b/tests/format.pure.lisp index 6f73f8477..81aa5810a 100644 --- a/tests/format.pure.lisp +++ b/tests/format.pure.lisp @@ -9,8 +9,6 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -(in-package :cl-user) - (defvar *format-mode*) (defun format* (format-control &rest arguments) diff --git a/tests/hash.pure.lisp b/tests/hash.pure.lisp index 64088cfcb..1817b5c44 100644 --- a/tests/hash.pure.lisp +++ b/tests/hash.pure.lisp @@ -9,8 +9,6 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -(in-package :cl-user) - ;;; +MAGIC-HASH-VECTOR-VALUE+ is used to mark empty entries in the slot ;;; HASH-VECTOR of hash tables. It must be a value outside of the range ;;; of SXHASH. The range of SXHASH is the non-negative fixnums. diff --git a/tests/pathnames.impure.lisp b/tests/pathnames.impure.lisp index f8a467fe9..3b3556a1b 100644 --- a/tests/pathnames.impure.lisp +++ b/tests/pathnames.impure.lisp @@ -14,6 +14,7 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. + ;;;; Pathname accessors (with-test (:name (pathname :accessors :stream-not-associated-to-file type-error)) diff --git a/tests/random.pure.lisp b/tests/random.pure.lisp index 6d305a3ba..9471c8541 100644 --- a/tests/random.pure.lisp +++ b/tests/random.pure.lisp @@ -11,8 +11,6 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -(in-package :cl-user) - ;;; Tests in this file that rely on properties of the distribution of ;;; the random numbers are designed to be fast and have a very low ;;; probability of false positives, generally of the order of (expt 10 -60). diff --git a/tests/seq.pure.lisp b/tests/seq.pure.lisp index d554a376a..59f907e72 100644 --- a/tests/seq.pure.lisp +++ b/tests/seq.pure.lisp @@ -11,8 +11,6 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -(in-package :cl-user) - ;;; As reported by Paul Dietz from his ansi-test suite for gcl, REMOVE ;;; malfunctioned when given :START, :END and :FROM-END arguments. ;;; Make sure it doesn't happen again. diff --git a/tests/setf.impure.lisp b/tests/setf.impure.lisp index f3a141ecf..f39cfb29b 100644 --- a/tests/setf.impure.lisp +++ b/tests/setf.impure.lisp @@ -13,8 +13,6 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -(in-package :cl-user) - (load "compiler-test-util.lisp") (defvar *foo* nil) diff --git a/tests/threads.impure.lisp b/tests/threads.impure.lisp index 13a5039cf..6f5cf050d 100644 --- a/tests/threads.impure.lisp +++ b/tests/threads.impure.lisp @@ -15,8 +15,8 @@ ;;;; WHITE-BOX TESTS (shadowing-import 'assertoid:assert-error) -(use-package :sb-thread) -(use-package :sb-sys) +(use-package "SB-THREAD") +(use-package "SB-SYS") (setf sb-unix::*on-dangerous-wait* :error)