.
This commit is contained in:
parent
f9bd0c8260
commit
8cb939e654
2190
primality_test.json
Normal file
2190
primality_test.json
Normal file
File diff suppressed because it is too large
Load diff
19
test-wycheproof.l
Normal file
19
test-wycheproof.l
Normal file
|
@ -0,0 +1,19 @@
|
|||
(load "@lib/json.l")
|
||||
(load "isprime.l")
|
||||
(mapc
|
||||
'((L)
|
||||
(let
|
||||
(N (hex (cdr (assoc "value" L)))
|
||||
R (cdr (assoc "result" L))
|
||||
I (prime? N 64) )
|
||||
(prin ".")
|
||||
(flush)
|
||||
(cond
|
||||
((and (= R "invalid") (not I)))
|
||||
((and (= R "valid") I))
|
||||
(T (quit "Boom!")) ) ) )
|
||||
(cddr (cadadr (assoc "testGroups" (in "primality_test.json" (readJson))))) )
|
||||
(prinl)
|
||||
(msg 'ok)
|
||||
(bye)
|
||||
|
Loading…
Reference in a new issue