History

unit tests: math funcs

Sigrid Solveig Haflínudóttir committed 1 year ago

Commit f83efa21 parent a376b631 file · +22 −2Browse files

Unified · Split

test/unittest.lsp+22−2
@@ -689,9 +689,29 @@ · 688 unmodified lines
689689 (assert (= 0 (sin 0.0f)))
690690 (assert (= 0 (sin (int64 0))))
691691 (assert (= 0 (sin (bignum 0))))
692−(assert-fail (sin "blah"))
693−(assert-fail (sin 'blah))
692+(assert (= 1 (cos 0)))
693+(assert (= 3 (sqrt 9)))
694+(assert (= 3 (log10 1000)))
695+(assert (= 0 (log 1)))
696+(assert (= 1 (exp 0)))
697+(assert (= 1 (log (exp 1))))
698+
699+(assert-fail (acos acos))
700+(assert-fail (asin asin))
701+(assert-fail (atan atan))
702+(assert-fail (ceiling ceiling))
703+(assert-fail (cos cos))
704+(assert-fail (cosh cosh))
705+(assert-fail (exp exp))
706+(assert-fail (expt expt expt))
707+(assert-fail (floor floor))
708+(assert-fail (log log))
709+(assert-fail (log10 log10))
694710 (assert-fail (sin sin))
711+(assert-fail (sinh sinh))
712+(assert-fail (sqrt sqrt))
713+(assert-fail (tan tan))
714+(assert-fail (tanh tanh))
695715
696716 (assert (= (length (table "hello" "goodbye" 123 456)) 2))
697717 (assert-fail (table 1))

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