Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More thorough CI testing. #113

Merged
merged 3 commits into from
Dec 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ echo "Completed shadowed-variable check .."

# Run golang tests
go test ./...

# Run the lisp tests
go build .
./yal examples/lisp-tests.lisp | _misc/tapview
22 changes: 17 additions & 5 deletions examples/lisp-tests.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,23 @@ If the name of the test is not unique then that will cause an error to be printe
(deftest cmp:=:3 (list (eq 1 -1) false))
(deftest cmp:=:4 (list (eq .5 (/ 1 2)) true))

;;TODO char<
;;TODO char>
;;TODO char>=
;;TODO char<=
;; char<
(deftest char<:1 (list (char< #\a #\b ) true))
(deftest char<:2 (list (char< #\b #\a ) false))

;; char<=
(deftest char<=:1 (list (char<= #\a #\b ) true))
(deftest char<=:2 (list (char<= #\b #\a ) false))
(deftest char<=:3 (list (char<= #\b #\b ) true))

;; char>
(deftest char>:1 (list (char> #\a #\b ) false))
(deftest char>:2 (list (char> #\b #\a ) true))

;; char>=
(deftest char>=:1 (list (char>= #\a #\b ) false))
(deftest char>=:2 (list (char>= #\b #\a ) true))
(deftest char>=:3 (list (char>= #\b #\b ) true))

;; zero? test
(deftest tst:zero:1 (list (zero? 0) true))
Expand Down Expand Up @@ -305,7 +318,6 @@ If the name of the test is not unique then that will cause an error to be printe
;; TODO / FIXME / BUG - should intersection return nil if there are no common elements?
(deftest intersection:3 (list (intersection (list 1) (list 2 3 4 )) nil))


;; reverse
(deftest reverse:1 (list (reverse (list "m" "e")) (list "e" "m")))
(deftest reverse:2 (list (reverse (list "狐" "犬" "π")) (list "π" "犬" "狐")))
Expand Down