12.07.2015 Views

LIsp Framework for Testing - Common Lisp.net

LIsp Framework for Testing - Common Lisp.net

LIsp Framework for Testing - Common Lisp.net

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

One More Example(deftest test-binary-search-tree ()((b (make-container 'binary-search-tree)))(:setup (empty! b))(:tests((insert-item b 2) ;; test #1(ensure (not (empty-p b))))(ensure (empty-p b)))) ;; test #2(addtest(insert-item b 2)(insert-item b 3)(delete-item b 2)(ensure-equal (size b) 5000)))Whoopts!Test Suite: TEST-BINARY-SEARCH-TREE -- 1 Failure, 0 Errors ***;-----------------------------------Failure: TEST-BINARY-SEARCH-TREE.TEST-4Condition: Ensure-equal: 1 is not EQUAL to 5000 in ((SIZE B) 5000)Code: ((INSERT-ITEM B 2) (INSERT-ITEM B 3) (DELETE-ITEM B 2)(ENSURE-EQUAL (SIZE B) 5000))October 2003University of Massachusetts, AmherstGary King - EKSL

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!