1
0
Fork 0

Compare commits

...

3 Commits

Author SHA1 Message Date
Craig Oates 77952ad294 ASDF package definition changes. 3 years ago
Craig Oates d11119bfdc export additional test function (at package level). 3 years ago
Craig Oates b055b97e2a rename tests file to main.lisp. 3 years ago
  1. 23
      ritherdon-rest.asd
  2. 5
      tests/package.lisp
  3. 35
      tests/ritherdon-rest-tests.lisp

23
ritherdon-rest.asd

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

5
tests/package.lisp

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

35
tests/ritherdon-rest-tests.lisp

@ -1,35 +0,0 @@
;;;; 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)))