Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tutorials:beginner:testing [2019/07/11 13:09] – [Setting up the infrastructure and our first test] gkazhoyatutorials:beginner:testing [2019/07/11 13:19] – [Integrating into the ASDF testing operation] gkazhoya
Line 199: Line 199:
          (pose-msg (roslisp:make-message 'turtlesim-msg:pose))          (pose-msg (roslisp:make-message 'turtlesim-msg:pose))
          (angle (tut::relative-angle-to goal pose-msg)))          (angle (tut::relative-angle-to goal pose-msg)))
-    (assert-number-equal angle pi))+    (assert-number-equal angle pi)))
 </code> </code>
  
-Unfortunately, if we rerun the tests now we will still get T as a result, as ASDF expects the testing library to throw an +Now let us rerun the tests:
-error if the tests fail, and ours does not. +
- +
-In the future, we might want to tweak the library such that it does throw errors but for now just remember how the +
-integration with the ASDF interfaces works. +
- +
-So let us see, though, if the test actually failed:+
  
 <code lisp> <code lisp>
-CL-USER> (lisp-unit:run-tests :all :cram-my-beginner-tutorial-tests)+CL-USER> (asdf:test-system :cram-beginner-tutorial-tests) 
 Unit Test Summary Unit Test Summary
  | 2 assertions total  | 2 assertions total
Line 219: Line 214:
  | 0 missing tests  | 0 missing tests
  
-#<TEST-RESULTS-DB Total(2) Passed(1) Failed(1) Errors(0)>+T
 </code> </code>
  
-To get more detailed information, set the ''*print-failures*'' parameter to T:+To get more detailed information, set the ''*print-failures*'' parameter of ''lisp-unit'' to T:
  
 <code lisp> <code lisp>
 CL-USER> (setf lisp-unit:*print-failures* t) CL-USER> (setf lisp-unit:*print-failures* t)
 T T
-CL-USER> (lisp-unit:run-tests :all :cram-my-beginner-tutorial-tests)+CL-USER> (asdf:test-system :cram-beginner-tutorial-tests)
  | Failed Form: PI  | Failed Form: PI
  | Expected 0.0d0 but saw 3.141592653589793d0  | Expected 0.0d0 but saw 3.141592653589793d0