Added a matlab version of the EXPECT assertion that throws a warning rather than an error on failure

release/4.3a0
Alex Cunningham 2013-10-30 16:12:15 +00:00
parent c5f8f5b5da
commit 511ab6334d
1 changed files with 10 additions and 0 deletions

10
matlab/+gtsam/EXPECT.m Normal file
View File

@ -0,0 +1,10 @@
function EXPECT(name,assertion)
% EXPECT throw a warning if an assertion fails
%
% EXPECT(name,assertion)
% - name of test
% - assertion
if (assertion~=1)
warning(['EXPECT ' name ' fails']);
end