Mercurial > hg > ltpda
comparison m-toolbox/classes/tests/database/@ltpda_ao_table/test_ao_mfilename.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 % | |
2 % DESCRIPTION: Tests the 'ao' table of the database. | |
3 % | |
4 % CHECKS: - Check that the 'mfilename' isempty. | |
5 % | |
6 % VERSION: $Id: test_ao_mfilename.m,v 1.2 2011/05/25 16:25:31 ingo Exp $ | |
7 % | |
8 function varargout = test_ao_mfilename(varargin) | |
9 | |
10 utp = varargin{1}; | |
11 | |
12 if ~utp.testRunner.skipRepoTests() | |
13 | |
14 dbTable = 'ao'; | |
15 tableField = 'mfilename'; | |
16 | |
17 % Check that the metadata was set with a submit PLIST | |
18 try | |
19 for nn = 1:numel(utp.objIds) | |
20 | |
21 % get 'mfilename' from the ao table | |
22 val = utp.getTableEntry(dbTable, tableField, utp.objIds(nn)); | |
23 | |
24 % Check that we get only one result for the query | |
25 assert(numel(val)==1) | |
26 | |
27 % Check that the entry in the table is the same as the desrciption | |
28 % of the test data | |
29 assert(isempty(val{1})) | |
30 | |
31 end | |
32 catch Me | |
33 throw(Me); | |
34 end | |
35 | |
36 varargout{1} = sprintf('Test the field ''%s'' of the database table ''%s'' with the database %s ', tableField, dbTable, utp.testRunner.repositoryPlist.find('database')); | |
37 else | |
38 varargout{1} = 'Skip database test'; | |
39 end | |
40 end |