Mercurial > hg > ltpda
comparison m-toolbox/test/repo_tests/test_miir.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 function test_miir(varargin) | |
2 % A test function to submit an miir to the repository. The miir is then | |
3 % retrieved and compared to the original one. | |
4 % | |
5 % Usage: test_miir() - connects to Hannover repository | |
6 % test_miir(conn) - connects to the repository specified by | |
7 % the database conn object. | |
8 % | |
9 % M Hewitson 24-02-08 | |
10 % | |
11 % $Id: test_miir.m,v 1.7 2008/11/14 09:51:55 hewitson Exp $ | |
12 % | |
13 | |
14 if nargin == 0 | |
15 conn = utils.mysql.connect('130.75.117.67', 'ltpda_test'); | |
16 else | |
17 conn = varargin{1}; | |
18 end | |
19 | |
20 %% Submit a timeformat | |
21 p = miir(plist); | |
22 | |
23 sinfo.conn = conn; | |
24 sinfo.experiment_title = 'submit miir'; | |
25 sinfo.experiment_description = 'this is just a test of the whole thing'; | |
26 sinfo.analysis_description = 'just submitting'; | |
27 sinfo.quantity = 'none'; | |
28 sinfo.keywords = 'none'; | |
29 sinfo.reference_ids = ''; | |
30 sinfo.additional_comments = 'none'; | |
31 sinfo.additional_authors = 'no one'; | |
32 | |
33 [ids, cid] = submit(p, sinfo); | |
34 | |
35 %% Retrieve the object | |
36 | |
37 q = miir(plist('conn', conn, 'cid', cid)) | |
38 | |
39 | |
40 %% Close connection | |
41 if nargin == 0 | |
42 close(conn); | |
43 end | |
44 | |
45 | |
46 %% Test | |
47 | |
48 if ne(p,q,'hist') | |
49 error('### miir objects are not the same.') | |
50 end |