History

differentiate between args error and arity error; assert must use print not princ

Sigrid Solveig Haflínudóttir committed 1 year ago

Commit 10691411 parent c0140954 files · +22 −13Browse files

Showing the changes to test (1 of 4 files). Show all

Unified · Split

test/unittest.sl+6−6
@@ -839,9 +839,9 @@ · 838 unmodified lines
839839
840840 (assert (eq? (sym 'blah) 'blah))
841841 (assert (eq? (sym "hi" "there" 'symbol 123) 'hitheresymbol123))
842−(assert-fail (sym) arg-error)
842+(assert-fail (sym) arity-error)
843843
844−(assert-fail (exit "error" 2) arg-error)
844+(assert-fail (exit "error" 2) arity-error)
845845
846846 (assert (not (int-valued? T)))
847847 (assert (not (int-valued? NIL)))
@@ -991,7 +991,7 @@ · 143 unmodified lines
991991 ; path-cwd
992992 (assert (str? (path-cwd)))
993993 (assert (path-cwd "."))
994−(assert-fail (path-cwd "." ".") arg-error)
994+(assert-fail (path-cwd "." ".") arity-error)
995995 (assert-fail (path-cwd "does/not/exist") io-error)
996996
997997 ; path-exists? + delete-file
@@ -1014,9 +1014,9 @@ · 16 unmodified lines
10141014 (assert (os-setenv "thisvarisdefined" NIL))
10151015 (assert (not (os-getenv "thisvarisdefined")))
10161016 (assert-fail (os-getenv))
1017−(assert-fail (os-getenv "abc" "def"))
1018−(assert-fail (os-setenv))
1019−(assert-fail (os-setenv "" "def"))
1017+(assert-fail (os-getenv "abc" "def") arity-error)
1018+(assert-fail (os-setenv) arity-error)
1019+(assert-fail (os-setenv "" "def") arg-error)
10201020 (if (equal? *os-name* "plan9")
10211021 (begin (assert-fail (os-setenv ".." "def"))
10221022 (assert (not (os-getenv ".."))))

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t