Mercurial > hg > ltpda
annotate m-toolbox/classes/tests/@ltpda_uo_tests/test_string.m @ 50:7d2e2e065cf1 database-connection-manager
Update unit tests
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 07 Dec 2011 17:24:37 +0100 |
parents | f0afece42f48 |
children |
rev | line source |
---|---|
0 | 1 % Test the string method works. |
2 function res = test_string(varargin) | |
3 | |
4 res = ''; | |
5 utp = varargin{1}; | |
6 | |
7 if ~isempty(utp.className) | |
8 obj = feval(utp.className); | |
9 str = string(obj); | |
10 sobj = eval(str); | |
11 % check that eval(str) creates the same type of object | |
12 assert(isa(sobj, utp.className)); | |
13 res = sprintf('%s/string works', class(obj)); | |
14 end | |
15 | |
16 end |