44 lines
925 B
Plaintext
44 lines
925 B
Plaintext
;; Function To Be Tested: time
|
|
;;
|
|
;; Source: Guy L Steele's CLTL Chapter 25:Miscellaneous Features
|
|
;; Section: 25.3 Debugging Tools
|
|
;; Page: 441
|
|
;;
|
|
;; Created By: John Park
|
|
;;
|
|
;; Creation Date: Aug 29,1986
|
|
;;
|
|
;; Last Update:
|
|
;;
|
|
;; Filed As: {ERIS}<LISPCORE>CML>TEST>25-3-time.test
|
|
;;
|
|
;;
|
|
;; Syntax: (time form)
|
|
;;
|
|
;; Function Description: This evaluates form and returns what form returns.
|
|
;; However, as a side effect, various timing data and other information are printed
|
|
;; to the stream that is the value of *trace-output*.
|
|
;;
|
|
;; Argument(s): form
|
|
;;
|
|
;; Returns: value of (form)
|
|
;;
|
|
;; Constraints/Limitations: none
|
|
|
|
|
|
|
|
|
|
(do-test "time-test"
|
|
(and (equal (time (identity '(a b c))) '(a b c))
|
|
(eql (time (cos 0)) 1.0)
|
|
(equal (time ((lambda (x y) (append x y)) '(a b) '(c d)))
|
|
'(a b c d))
|
|
(eq (time (setq x 10000)) 10000)
|
|
(equal (time (string 'strings)) "STRINGS")))
|
|
|
|
STOP
|
|
|
|
|
|
|
|
|