1
0
Fork 0

Compare commits

...

4 Commits

Author SHA1 Message Date
Craig Oates 05b876bea7 add 'hello' function (for quick test after loading package). 3 years ago
Craig Oates 8f8cd147ce integrate FiveAM into test package def. and main testing file. 3 years ago
Craig Oates 943a912d96 connect fiveAM testing package to main project in .asd file. 3 years ago
Craig Oates 26b025361d remove doc folder. 3 years ago
  1. 4
      doc/package.lisp
  2. 3
      doc/ritherdon-rest-doc.lisp
  3. 25
      ritherdon-rest.asd
  4. 3
      src/ritherdon-rest.lisp
  5. 4
      tests/package.lisp
  6. 33
      tests/ritherdon-rest-tests.lisp

4
doc/package.lisp

@ -1,4 +0,0 @@
;;;; package.lisp
(defpackage #:ritherdon-rest-doc
(:use #:cl))

3
doc/ritherdon-rest-doc.lisp

@ -1,3 +0,0 @@
;;;; ritherdon-rest-doc.lisp
(in-package #:ritherdon-rest-doc)

25
ritherdon-rest.asd

@ -7,27 +7,24 @@
:license "MIT" :license "MIT"
:version "0.0.1" :version "0.0.1"
:serial t :serial t
:in-order-to ((test-op (test-op "ritherdon-rest/tests")))
:pathname "src/" :pathname "src/"
:components ((:file "package") :components ((:file "package")
(:file "ritherdon-rest"))) (:file "ritherdon-rest")))
;; The use of '...rest/tests' was because of a warning when trying to
;; run the code in SLIME.
(asdf:defsystem #:ritherdon-rest/tests (asdf:defsystem #:ritherdon-rest/tests
:description "The test suite for the ritherdon-rest project." :description "The test suite for the ritherdon-rest project."
:author "craig@craigoates.net" :author "craig@craigoates.net"
:license "MIT" :license "MIT"
:version "0.0.1" :version "0.0.1"
:serial t :serial t
:depends-on (#:fiveam) :depends-on (:ritherdon-rest :fiveam)
:pathname "tests/" :perform (test-op (o s)
:components ((:file "package") (uiop:symbol-call :fiveam :run!
(:file "ritherdon-rest-tests"))) 'ritherdon-rest-tests:all-tests))
:components ((:module "tests"
(asdf:defsystem #:ritherdon-rest/doc :serial t
:description "The doc's package for the ritherdon-rest project." :components ((:file "package")
:author "craig@craigoates.net" (:file "ritherdon-rest-tests")))))
:license "MIT"
:version "0.0.1"
:serial t
:pathname "doc/"
:components ((:file "package")
(:file "ritherdon-rest-doc")))

3
src/ritherdon-rest.lisp

@ -2,4 +2,5 @@
(in-package #:ritherdon-rest) (in-package #:ritherdon-rest)
(print "The system is up and running.") (defun hello ()
(print "The system is up and running."))

4
tests/package.lisp

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

33
tests/ritherdon-rest-tests.lisp

@ -2,7 +2,34 @@
(in-package #:ritherdon-rest-tests) (in-package #:ritherdon-rest-tests)
(fiveam:test sum-1 (def-suite all-tests
(fiveam:is (= 3 (+ 1 2)))) :description "The master suite of all ritherdon-rest tests.")
(fiveam:run!) (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)))