mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
tests: Less IN-PACKAGE noise
This commit is contained in:
parent
8915d6aa8c
commit
5cce5e1230
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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) #()))))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
(in-package :cl-user)
|
||||
|
||||
(with-test (:name (make-array :bad-initial-contents))
|
||||
(assert
|
||||
(nth-value 1
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
;;;; absolutely no warranty. See the COPYING and CREDITS files for
|
||||
;;;; more information.
|
||||
|
||||
|
||||
;;;; Helpers
|
||||
|
||||
(defun test (kind name state make-body
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue