Created
June 12, 2013 14:36
-
-
Save PuercoPop/5765844 to your computer and use it in GitHub Desktop.
Why does the test fail?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(in-package :cl-user) | |
(ql:quickload :fiveam) | |
(defun top-left (board) | |
(car board)) | |
(defun (setf top-left) (value board) | |
(setf (car board) value)) | |
(fiveam:test top-left-accessor () | |
(let ((board '(:1 :2 :3 :4 :5 :6 :7 :8 :9)) | |
(expected-board '(:empty :2 :3 :4 :5 :6 :7 :8 :9))) | |
(setf (top-left board) :empty) | |
(fiveam:is (equal board expected-board)))) | |
(fiveam:run! 'top-left-accessor) | |
;; Result of running this | |
;; Failure Details: | |
;; -------------------------------- | |
;; TOP-LEFT-ACCESSOR []: | |
;; EXPECTED-BOARD evaluated to (:EMPTY :|2| :|3| :|4| :|5| :|6| :|7| :|8| :|9|), which is not EQUAL to (:EMPTY | |
;; :|2| | |
;; :|3| | |
;; :|4| | |
;; :|5| | |
;; :|6| | |
;; :|7| | |
;; :|8| | |
;; :|9|).. | |
;; -------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment