comparison m-toolbox/classes/tests/@ltpda_uoh_tests/test_history_setName.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 % Tests on the history field when doing an operation like setName.
2 function res = test_history_setName(varargin)
3
4 res = '';
5 utp = varargin{1};
6
7 if ~isempty(utp.className)
8 % empty constructor
9 obj = feval(utp.className);
10 aName = 'my object';
11 obj.setName(aName);
12
13 h = obj.hist;
14
15 % minfo
16 ii = h.methodInfo;
17 assert(strcmp(ii.mname, 'setName'), 'The method name in methodInfo was not %s', 'setName');
18 assert(strcmp(ii.mclass, 'ltpda_uo'), 'The class in methodInfo was not %s', 'ltpda_uo');
19
20 % plist
21 pl = h.plistUsed;
22 assert(strcmp(pl.find('name'), aName), 'The name in plistUsed was not %s', aName);
23
24 res = sprintf('%s history works when calling setName', class(obj));
25 end
26
27 end