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