1
0
Fork 0

Compare commits

..

No commits in common. '77952ad2945ee6d4a8a49765d8eff80a153e051f' and '8c87cf5b37aa88405c6e12e4c543b9475c76145b' have entirely different histories.

  1. 23
      ritherdon-rest.asd
  2. 5
      tests/package.lisp
  3. 35
      tests/ritherdon-rest-tests.lisp

23
ritherdon-rest.asd

@ -7,12 +7,11 @@
:license "MIT"
:version "0.0.1"
:serial t
:depends-on (:drakma
:cl-json)
:in-order-to ((test-op (test-op "ritherdon-rest/tests")))
:depends-on (:drakma :cl-json)
:pathname "src/"
:components ((:file "package")
(:file "ritherdon-rest"))
:in-order-to ((test-op (test-op :ritherdon-rest/tests))))
(:file "ritherdon-rest")))
;; The use of '...rest/tests' was because of a warning when trying to
;; run the code in SLIME.
@ -21,13 +20,11 @@
:author "craig@craigoates.net"
:license "MIT"
:version "0.0.1"
:serial t
:depends-on (:ritherdon-rest
:fiveam)
:pathname "tests/"
:components ((:file "package")
(:file "main"))
:depends-on (:ritherdon-rest :fiveam)
:perform (test-op (o s)
(uiop:symbol-call :ritherdon-rest-tests :test-quasi)))
(uiop:symbol-call :fiveam :run!
'ritherdon-rest-tests:all-tests))
:components ((:module "tests"
:serial t
:components ((:file "package")
(:file "ritherdon-rest-tests")))))

5
tests/package.lisp

@ -1,7 +1,6 @@
;;;; tests/package.lisp
;;;; package.lisp
(defpackage #:ritherdon-rest-tests
(:use #:cl #:fiveam)
(:export #:run!
#:all-tests
#:test-quasi))
#:all-tests))

35
tests/ritherdon-rest-tests.lisp

@ -0,0 +1,35 @@
;;;; ritherdon-rest-tests.lisp
(in-package #:ritherdon-rest-tests)
(def-suite all-tests
:description "The master suite of all ritherdon-rest tests.")
(in-suite all-tests)
;; These two examples show the 'full' call to the fiveAm test
;; functions. This is just for reference. The 'namespace' is already
;; 'imported' in 'package.lisp'.
;; (fiveam:test sum-1
;; (fiveam:is (= 3 (+ 1 2))))
;; (fiveam:run!)
;; How you would normally create the tests -- with fiveAM already
;; set-up in 'package.lisp' and not needing to be explicit about it
;; here. This is similar to 'using static' in C#.
(defun test-quasi()
(run! 'all-tests))
(test dummy-tests
"Just a placeholder."
(is (listp (list 1 2)))
(is (= 5 (+ 2 3)))
(is (< 4 (+ 100 400))))
(test dummy-tests-two
"This is another placeholder test.
This is just to make sure everything is set-up properly."
(is (equal 4 4)))