view m-toolbox/test/repo_tests/test_zero.m @ 29:54f14716c721
database-connection-manager
Update Java code
author
Daniele Nicolodi <nicolodi@science.unitn.it>
date
Mon, 05 Dec 2011 16:20:06 +0100 (2011-12-05)
parents
f0afece42f48
children
line source
+ − function test_zero(varargin)
+ −
+ − if nargin == 0
+ − [conn, username] = mysql_connect('localhost', 'ltpda_test');
+ − else
+ − conn = varargin{1};
+ − username = varargin{2};
+ − end
+ −
+ − %% Submit a timeformat
+ − p = zero(1,2.3);
+ −
+ − sinfo.conn = conn;
+ − sinfo.username = username;
+ − sinfo.experiment_title = 'submit zero';
+ − sinfo.experiment_description = 'this is just a test of the whole thing';
+ − sinfo.reference_ids = '';
+ − sinfo.additional_comments = 'none';
+ − sinfo.additional_authors = 'no one';
+ −
+ −
+ − [ids, cid] = ltpda_obj_submit(p, sinfo);
+ −
+ − %% Retrieve the object
+ −
+ − q = ltpda_obj_retrieve(conn, cid);
+ −
+ − %% Close connection
+ − if nargin == 0
+ − close(conn);
+ − end
+ −
+ − %% Test
+ −
+ − if p ~= q
+ − error('### zero objects are not the same.')
+ − end