tests: Less IN-PACKAGE noise

This commit is contained in:
Jan Moringen 2018-12-07 19:57:15 +01:00
parent 8915d6aa8c
commit 5cce5e1230
19 changed files with 15 additions and 40 deletions

View file

@ -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))

View file

@ -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)

View file

@ -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) #()))))

View file

@ -1,5 +1,3 @@
(in-package :cl-user)
(with-test (:name (make-array :bad-initial-contents))
(assert
(nth-value 1

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -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

View file

@ -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.

View file

@ -9,6 +9,7 @@
;;;; absolutely no warranty. See the COPYING and CREDITS files for
;;;; more information.
;;;; Helpers
(defun test (kind name state make-body

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -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.

View file

@ -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))

View file

@ -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).

View file

@ -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.

View file

@ -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)

View file

@ -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)