Mercurial > hg > ltpda
comparison m-toolbox/test/repo_tests/test_cdata.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_cdata(varargin) | |
2 | |
3 if nargin == 0 | |
4 [conn, username] = mysql_connect('130.75.117.67', 'ltpda_test'); | |
5 else | |
6 conn = varargin{1}; | |
7 username = varargin{2}; | |
8 end | |
9 %% Submit a mfir | |
10 p = cdata(complex(randn(4,4), randn(4,4))); | |
11 | |
12 sinfo.conn = conn; | |
13 sinfo.username = username; | |
14 sinfo.experiment_title = 'submit cdata'; | |
15 sinfo.experiment_description = 'this is just a test of the whole thing'; | |
16 sinfo.reference_ids = ''; | |
17 sinfo.additional_comments = 'none'; | |
18 sinfo.additional_authors = 'no one'; | |
19 | |
20 | |
21 [ids, cid] = ltpda_obj_submit(p, sinfo) | |
22 | |
23 %% Retrieve the object | |
24 | |
25 q = ltpda_obj_retrieve(conn, cid) | |
26 | |
27 %% Close connection | |
28 if nargin == 0 | |
29 close(conn); | |
30 end | |
31 | |
32 | |
33 %% Test | |
34 | |
35 if p ~= q | |
36 error('### cdata objects are not the same.') | |
37 end |