r11859: Canonicalize whitespace
[xptest.git] / xptest-example.lisp
index d93bae1d28afa25f348fd14e591855b611314cf4..e96d0bf2bba5c5f4bd68033557ff6735cf8db669 100644 (file)
   (let ((result (+ (numbera test) (numberb test))))
     (unless (= result 5)
       (failure "Result was not 5 when adding ~A and ~A"
-              (numbera test) (numberb test)))))
+               (numbera test) (numberb test)))))
 
 (defmethod subtraction-test ((test math-fixture))
   (let ((result (- (numberb test) (numbera test))))
     (unless (= result 1)
       (failure "Result was not 1 when subtracting ~A ~A"
-             (numberb test) (numbera test)))))
+              (numberb test) (numbera test)))))
 
 ;;; This method is meant to signal a failure
 (defmethod subtraction-test2 ((test math-fixture))
   (let ((result (- (numbera test) (numberb test))))
     (unless (= result 1)
       (failure "Result was not 1 when subtracting ~A ~A"
-             (numbera test) (numberb test)))))
+              (numbera test) (numberb test)))))
 
 
 ;;; Now we can create a test-suite.  A test-suite contains a group of
 ;;; test-case.
 
 (setf math-test-suite (make-test-suite
-                      "Math Test Suite"
-                      "Simple test suite for arithmetic operators."
-                      ("Addition Test" 'math-fixture
-                       :test-thunk 'addition-test
-                       :description "A simple test of the + operator")
-                      ("Subtraction Test" 'math-fixture
-                       :test-thunk 'subtraction-test
-                       :description "A simple test of the - operator")))
+                       "Math Test Suite"
+                       "Simple test suite for arithmetic operators."
+                       ("Addition Test" 'math-fixture
+                        :test-thunk 'addition-test
+                        :description "A simple test of the + operator")
+                       ("Subtraction Test" 'math-fixture
+                        :test-thunk 'subtraction-test
+                        :description "A simple test of the - operator")))
 
 (add-test (make-test-case "Substraction Test 2" 'math-fixture
-                         :test-thunk 'subtraction-test2
-                         :description "A broken substraction test, should fail.")
-         math-test-suite)
+                          :test-thunk 'subtraction-test2
+                          :description "A broken substraction test, should fail.")
+          math-test-suite)
 
 ;;;; Finally we can run our test suite and see how it performs.
 ;;;; (report-result (run-test math-test-suite) :verbose t)