doc/list-exports.lisp: Better pretty formatting for keywords.
[sod] / src / sod-test.asd
index 17d6d40..b3024dc 100644 (file)
 
    ;; Test the parser edifice.
    (:module "parser" :depends-on ("test-base") :components
-    ((:file "test-parser")
-     (:file "test-scanner-charbuf")))
+    ((:file "parser-test")
+     (:file "scanner-charbuf-test")))
 
    ;; The actual tests.
-   (:file "test-c-types" :depends-on ("test-base"))
-   (:file "test-codegen" :depends-on ("test-base"))))
+   (:file "c-types-test" :depends-on ("test-base"))
+   (:file "codegen-test" :depends-on ("test-base"))
+   (:file "lexer-test" :depends-on ("test-base"))))
 
 ;;;--------------------------------------------------------------------------
 ;;; Testing.
 
 (defmethod perform ((op test-op) (system (eql (find-system "sod-test"))))
-  (operate 'load-op system)
-  (funcall (find-symbol "RUN-TESTS" "SOD-TEST")))
-
-;;;--------------------------------------------------------------------------
-;;; Hacks.
-
-(defmethod perform :around
-    ((op compile-op) (component (eql (find-system "sod-test"))))
-  (let ((*compile-file-failure-behaviour* :warn))
-    (call-next-method)))
+  (handler-bind (((or warning style-warning)
+                 (lambda (cond)
+                   (declare (ignore cond))
+                   (invoke-restart 'muffle-warning))))
+    (operate 'load-op system)
+    (let ((result (funcall (find-symbol "RUN-TESTS" "SOD-TEST"))))
+      (unless (funcall (find-symbol "WAS-SUCCESSFUL" "XLUNIT") result)
+       (error "Failed test")))))
 
 ;;;----- That's all, folks --------------------------------------------------