mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-21 14:49:17 +02:00
Issue #404 - Added unit tests
This commit is contained in:
parent
61cc07f99e
commit
a2a518fd02
1 changed files with 15 additions and 0 deletions
|
@ -31,6 +31,21 @@
|
||||||
(test 2.0 (denominator (/ 6 4)))
|
(test 2.0 (denominator (/ 6 4)))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(test-group
|
||||||
|
"records"
|
||||||
|
(define-record-type employee
|
||||||
|
(make-employee name title)
|
||||||
|
employee?
|
||||||
|
(name get-name)
|
||||||
|
(title get-title)
|
||||||
|
(test get-test set-test!)) ;; Uninitialized by constructor
|
||||||
|
(define e (make-employee "test-name" "job 1"))
|
||||||
|
|
||||||
|
(test #f (get-test e))
|
||||||
|
(set-test! e 'test-field)
|
||||||
|
(test 'test-field (get-test e))
|
||||||
|
)
|
||||||
|
|
||||||
(test-group
|
(test-group
|
||||||
"I/O"
|
"I/O"
|
||||||
(define p (open-input-string "one\ntwo\n"))
|
(define p (open-input-string "one\ntwo\n"))
|
||||||
|
|
Loading…
Add table
Reference in a new issue