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