psycharo-zz / factor-graph

matlab/c++ factor graph framework
32 stars 8 forks source link

`clear classes` in test suite? #24

Closed ghost closed 12 years ago

ghost commented 12 years ago

Apparently there is a need to call clear classes before doing a test. What is this? Can you let the the test functions run without changing the state of the workspace? What I mean is sort of in a sandbox or iis it harmless to run clear classes?

see below what happened.

>> testAddNode
Starting test run with 2 test cases.
FF
FAILED in 0.013 seconds.

===== Test Case Failure =====
Location: D:\Dropbox\mymatlab\psycharo-factor-graph\code\cpp-factor-graph\matlab\tests\testAddNode.m
Name:     testForward

D:\Dropbox\mymatlab\psycharo-factor-graph\code\cpp-factor-graph\matlab\tests\testAddNode.m at line 9

Cannot redefine class 'object' without a call to 'clear classes'.

===== Test Case Failure =====
Location: D:\Dropbox\mymatlab\psycharo-factor-graph\code\cpp-factor-graph\matlab\tests\testAddNode.m
Name:     testBackward

D:\Dropbox\mymatlab\psycharo-factor-graph\code\cpp-factor-graph\matlab\tests\testAddNode.m at line 33

Cannot redefine class 'object' without a call to 'clear classes'.

>> clear classes
>> testAddNode
Starting test run with 2 test cases.
..
PASSED in 0.662 seconds.
psycharo-zz commented 12 years ago

I never met that. Also, you can run all the tests by running xtest function runtests

ghost commented 12 years ago

cool