1
0
mirror of synced 2026-05-02 06:26:19 +00:00
Files
Interlisp.medley/internal/test/LANGUAGE/AUTO/12-7-LOGXOR.TEST

37 lines
823 B
Plaintext

;; Function To Be Tested: logxor
;;
;; Source: Common Lisp by Guy Steele
;; Section 12.7: Logical Operations on Numbers Page: 220
;;
;; Created By: John Park
;;
;; Creation Date: July 11, 86
;;
;; Last Update:
;;
;; Filed as: {eris}<lispcore>cml>test>12-7-logxor.test
;;
;; Syntax: logxor &rest integers
;;
;; Function Description: This returns the bit-wise logical exclusive or of its
;; arguments. If no argument is given, then the result is zero, which is
;; and identity for this operation.
;; Argument(s): integer(s)
;;
;; Returns: zero or integer
;;
;; Constraints/limitations: None
(do-test logxor-test
(and (eq (logxor 0 0) 0)
(eq (logxor 0 1) 1)
(eq (logxor 1 0) 1)
(eq (logxor 1 1) 0)
(zerop (logxor))
(eq (logxor 11 5) 14)
(eq (logxor 1 3 9) 11)))
STOP