Mercurial > hg > ltpda
comparison m-toolbox/classes/tests/@Assert/fail.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 % FAIL throws an AssertionFailed exception with the given message. | |
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3 % | |
4 % DESCRIPTION: FAIL throws an AssertionFailed exception with the given message. | |
5 % | |
6 % COMMAND: Assert.fail(message) | |
7 % | |
8 % VERSION: $Id: fail.m,v 1.1 2011/06/20 16:32:56 ingo Exp $ | |
9 % | |
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
11 function fail(varargin) | |
12 | |
13 if isempty(varargin) | |
14 ex = AssertionFailed(Assert.errMsgId, Assert.defaultErrMsg); | |
15 else | |
16 ex = AssertionFailed(Assert.errMsgId, varargin{:}); | |
17 end | |
18 | |
19 ex.throwAsCaller(); | |
20 | |
21 end |