comparison m-toolbox/test/repo_tests/test_zero.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_zero(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 timeformat
11 p = zero(1,2.3);
12
13 sinfo.conn = conn;
14 sinfo.username = username;
15 sinfo.experiment_title = 'submit zero';
16 sinfo.experiment_description = 'this is just a test of the whole thing';
17 sinfo.reference_ids = '';
18 sinfo.additional_comments = 'none';
19 sinfo.additional_authors = 'no one';
20
21
22 [ids, cid] = ltpda_obj_submit(p, sinfo);
23
24 %% Retrieve the object
25
26 q = ltpda_obj_retrieve(conn, cid);
27
28 %% Close connection
29 if nargin == 0
30 close(conn);
31 end
32
33 %% Test
34
35 if p ~= q
36 error('### zero objects are not the same.')
37 end