0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 % Test the setting the description works.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2 function res = test_setDescription(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 res = '';
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 utp = varargin{1};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 if ~isempty(utp.className)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 obj = feval(utp.className);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 desc = 'a nice description';
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 obj.setDescription(desc);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 assert(ischar(obj.description));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 assert(strcmp(desc, obj.description));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 res = sprintf('%s/setDescription works', class(obj));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 end |