diff --git a/test/test-around-compile.script b/test/test-around-compile.script index 0aa7bf31130612aa302dc41d3e6f1b6304d6b4ca..d3bcd8a335f7f38f7790ccb82e7b703c26582e5c 100644 --- a/test/test-around-compile.script +++ b/test/test-around-compile.script @@ -10,7 +10,7 @@ ;; :depends-on ((:version :asdf "2.017.18")) ; no :around-compile before that. :components ((:file "test"))) (load-system 'test-around-compile :force t) -(assert (= 3 (funcall 'add10 1))) ;; add10 must have been compiled in base 2 +(assert-equal 3 (funcall 'add10 1)) ;; add10 must have been compiled in base 2 (fmakunbound 'add10) @@ -21,4 +21,4 @@ (funcall thunk))) :components ((:file "test"))) (load-system 'test-around-compile-lambda :force t) -(assert (= 10 (funcall 'add10 1))) ;; add10 must have been compiled in base 16 +(assert-equal 10 (funcall 'add10 1)) ;; add10 must have been compiled in base 16 diff --git a/test/test-bundle.script b/test/test-bundle.script index 962012cc3f5b2b5093a4810deff671b405ca8aba..d51a9d25bac281019f2e8bebb01bc133c0551c7f 100644 --- a/test/test-bundle.script +++ b/test/test-bundle.script @@ -57,8 +57,8 @@ (operate 'dll-op :test-asdf/dll-test) (si:load-foreign-module (first (output-files 'dll-op :test-asdf/dll-test))) (operate 'load-op :test-asdf/dll-user) - (assert (= (test-package::sample-function) 42)) + (assert-equal (test-package::sample-function) 42) (operate 'monolithic-dll-op :test-asdf/monodll) (si:load-foreign-module (first (output-files 'monolithic-dll-op :test-asdf/monodll))) (operate 'load-op :test-asdf/monodll-user) - (assert (= (test-package::always-42) 42))) + (assert-equal (test-package::always-42) 42)) diff --git a/test/test-force.script b/test/test-force.script index 4a16f3d2bcd743756f6eb00267831f5d40765348..59a5b294b1a172333433ec778e2467014709b520 100644 --- a/test/test-force.script +++ b/test/test-force.script @@ -19,4 +19,4 @@ ;; forced, it should be later (load-system 'test-force :force t) -(assert (>= (get-file-stamp file1) file1-date)) +(assert-compare (>= (get-file-stamp file1) file1-date)) diff --git a/test/test-module-depend.script b/test/test-module-depend.script index 73b0204e736cd18d6b43ccf77a5ee1ad29e229a3..1eaca67bd8bdc8fe0a45ec81af85ae9afabb9d79 100644 --- a/test/test-module-depend.script +++ b/test/test-module-depend.script @@ -13,7 +13,8 @@ (assert-pathname-equal file2.fasl (test-fasl "file2")) (assert-pathname-equal file3.fasl (test-fasl "file3")) -(assert (and file1-date file3-date)) +(assert file1-date) +(assert file3-date) ;; and loaded (assert (asymval '#:*file1* :test-package)) @@ -27,6 +28,6 @@ (touch-file file2.fasl :timestamp (- file3-date 30)) (touch-file file3.fasl :timestamp (- file3-date 15)) (load-system 'test-module-depend) -(assert (>= (get-file-stamp file2.fasl) file3-date)) +(assert-compare (>= (get-file-stamp file2.fasl) file3-date)) ;; does this properly go to the second level? -(assert (>= (get-file-stamp file3.fasl) file3-date)) +(assert-compare (>= (get-file-stamp file3.fasl) file3-date)) diff --git a/test/test-module-excessive-depend.script b/test/test-module-excessive-depend.script index 5976ef749d3e174d826a7ef44da4c2a0ab986891..f3187f9a622959de7c3e86781860b4c3d7059238 100644 --- a/test/test-module-excessive-depend.script +++ b/test/test-module-excessive-depend.script @@ -75,8 +75,8 @@ (when (loop :for (o . c) :in plan :thereis (and (eq c file3c) (typep o 'asdf:compile-op))) (error "Excessive operations on file3-only system. Bad propagation of dependencies.")) (operate 'load-op 'test-module-excessive-depend) -(assert (>= (file-write-date file1) before)) -(assert (>= (file-write-date file2) before)) +(assert-compare (>= (file-write-date file1) before)) +(assert-compare (>= (file-write-date file2) before)) (unless (= (file-write-date file3) file3-date) (error "Excessive compilation of file3.lisp: traverse bug.")) diff --git a/test/test-redundant-recompile.script b/test/test-redundant-recompile.script index 81cd198338b04ab2e58f0af4128a3af5097b1123..e5e2219c454b67934893abb622300f82f17e1d19 100644 --- a/test/test-redundant-recompile.script +++ b/test/test-redundant-recompile.script @@ -33,6 +33,5 @@ ;; now rerun the load-op and check that no files are recompiled (load-system 'test-redundant-recompile) -(assert (= file1-date (file-write-date file1))) -(assert (= file2-date (file-write-date file2))) - +(assert-equal file1-date (file-write-date file1)) +(assert-equal file2-date (file-write-date file2)) diff --git a/test/test-sysdef-asdf.script b/test/test-sysdef-asdf.script index ca64760d6353442b9c9ca9fa696543bfc7c27204..8af5ae09e5658e9993da16d64e85252a0fc0ba53 100644 --- a/test/test-sysdef-asdf.script +++ b/test/test-sysdef-asdf.script @@ -51,17 +51,19 @@ (DBG "Checking that Makefile and asdf.asd are in synch") (defun system-lisp-files (system) (loop :for f :in (required-components system :keep-component 'cl-source-file) - :collect (namestring (enough-pathname (component-pathname f) *asdf-directory*)))) + :collect (enough-pathname (component-pathname f) *asdf-directory*))) (defun makefile-lisp-files (target) - (remove-if 'emptyp - (split-string ;; NB: assumes GNU make - (run-program `("make" "--quiet" "--no-print-directory" ,target) - :output :string :error-output t :directory *asdf-directory*) - :separator #(#\space #\newline #\return #\tab)))) + (mapcar + 'parse-unix-namestring + (remove-if 'emptyp + (split-string ;; NB: assumes GNU make + (run-program `("make" "--quiet" "--no-print-directory" ,target) + :output :string :error-output t :directory *asdf-directory*) + :separator #(#\space #\newline #\return #\tab))))) (defmacro compare-files (system target) - `(assert-equal (system-lisp-files ,system) (makefile-lisp-files ,target))) + `(assert-pathnames-equal (system-lisp-files ,system) (makefile-lisp-files ,target))) (DBG "Testing that the Makefile and ASDF agree on the order of UIOP files") (compare-files :uiop "driver-files") diff --git a/test/test-touch-system-1.script b/test/test-touch-system-1.script index b95eadb70e785da6a5621deca92fed23bbd8882f..f648080ad75f8a87eb92ea6bdf4d4e856683c3ca 100644 --- a/test/test-touch-system-1.script +++ b/test/test-touch-system-1.script @@ -4,8 +4,7 @@ ;;; system that can be found using *system-definition-search-functions* (defun system-registered-time (name) - (if-let (data (asdf::system-registered-p name)) - (car data))) + (car (asdf::system-registered-p name))) (defparameter test1.asd (nth-value 2 (locate-system :test1))) (assert-pathname-equal test1.asd (test-source "test1.asd")) (defparameter file1.lisp (test-source "file1.lisp")) @@ -25,9 +24,9 @@ (DBG :blah date1 date2 date3 date4 date5) (assert-equal date2 date5) (assert-equal date2 date5) -(assert (>= date4 date3)) +(assert-compare (>= date4 date3)) (sleep 1) (touch-file test1.asd) (find-system :test1) (defparameter date6 (system-registered-time :test1)) -(assert (> date6 date4)) +(assert-compare (> date6 date4)) diff --git a/test/test-touch-system-2.script b/test/test-touch-system-2.script index 9328f3728a9ab6f5a301da67e41b973b5365b90a..b13593973304cae2889f714443202e7d4491e78a 100644 --- a/test/test-touch-system-2.script +++ b/test/test-touch-system-2.script @@ -4,9 +4,7 @@ ;;; system that canNOT be found using *system-definition-search-functions* (defun system-registered-time (name) - (let ((data (asdf::system-registered-p name))) - (when data - (car data)))) + (car (asdf::system-registered-p name))) (defparameter test1.asd (nth-value 2 (locate-system :test1))) (assert-pathname-equal test1.asd (test-source "test1.asd")) @@ -21,4 +19,4 @@ (find-system :test1) (defparameter date2 (system-registered-time :test1)) (assert date2) -(assert (> date2 date1)) +(assert-compare (> date2 date1))