Skip to content

Commit

Permalink
Removed all ‘logical’ elements of tests, since they were causing inco…
Browse files Browse the repository at this point in the history
…rrect failures.
  • Loading branch information
etjones-erisyon committed Mar 29, 2014
1 parent c025989 commit 3a50775
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ex2/test_predict.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ function test_predict ()
1 1];

% all these should pass
assert(predict([1 1]', X), logical([1 1 1 1]'));
assert(predict([0 0]', X), logical([1 1 1 1]'));
assert(predict([1 1]', X), [1 1 1 1]');
assert(predict([0 0]', X), [1 1 1 1]');

% fail ... according to some math...
assert(predict([-1 -1]', X), logical([1 0 0 0]'));
assert(predict([-1 0]', X), logical([1 1 0 0]'));
assert(predict([0 -1]', X), logical([1 0 1 0]'));
assert(predict([-1 -1]', X), logical([1 0 0 0]'));
assert(predict([-1 -1]', X), [1 0 0 0]');
assert(predict([-1 0]', X), [1 1 0 0]');
assert(predict([0 -1]', X), [1 0 1 0]');
assert(predict([-1 -1]', X), [1 0 0 0]');

% fail or pass ... based on the same math as above (which
% is intentionally not shared)
assert(predict([1.1 -1]', X), logical([1 0 1 1]'));
assert(predict([-1 1.1]', X), logical([1 1 0 1]'));
assert(predict([1.1 -1]', X), [1 0 1 1]');
assert(predict([-1 1.1]', X), [1 1 0 1]');

endfunction

0 comments on commit 3a50775

Please sign in to comment.