46 lines
1.0 KiB
Plaintext
46 lines
1.0 KiB
Plaintext
;; Function To Be Tested: random-state-p
|
|
;;
|
|
;; Source: Common Lisp by Guy Steele
|
|
;; Section 12.9: Random Numbers
|
|
;; Page: 231
|
|
;;
|
|
;; Created By: John Park
|
|
;;
|
|
;; Creation Date: July 22, 86
|
|
;;
|
|
;; Last Update:
|
|
;;
|
|
;; Filed as: {eris}<lispcore>cml>test>12-9-random-state-p.test
|
|
;;
|
|
;; Syntax: random-state-p &optional state
|
|
;;
|
|
;; Function Description: This function returns true if its argument
|
|
;; a random-state object, and otherwise is false.
|
|
;;
|
|
;; Argument(s): object
|
|
;;
|
|
;; Returns: object of type random-state
|
|
;;
|
|
;; Constraints/limitations: None
|
|
|
|
|
|
(do-test-group random-state-p-test-setup
|
|
:before (progn
|
|
(setq random-state1 (make-random-state))
|
|
(setq random-state2 (make-random-state))
|
|
(setq random-state3 (make-random-state)))
|
|
|
|
|
|
|
|
(do-test random-state-p-test
|
|
(and (random-state-p random-state1)
|
|
(random-state-p random-state2)
|
|
(random-state-p random-state3)
|
|
(random-state-p *random-state*)
|
|
(eq(random-state-p 'random-state) nil)
|
|
(eq (random-state-p 1234) nil))))
|
|
|
|
STOP
|
|
|
|
|