source: trunk/oldtest/src/RpMatlab_test.m @ 4635

Last change on this file since 4635 was 3177, checked in by mmc, 12 years ago

Updated all of the copyright notices to reference the transfer to
the new HUBzero Foundation, LLC.

File size: 2.2 KB
Line 
1% ----------------------------------------------------------------------
2%  TEST: Octave's Rappture Library Test Functions.
3%
4%
5%
6%
7% ======================================================================
8%  AUTHOR:  Derrick Kearney, Purdue University
9%  Copyright (c) 2004-2012  HUBzero Foundation, LLC
10%
11%  See the file "license.terms" for information on usage and
12%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13% ======================================================================
14
15%op = sprintf('%s:%s:%s', path, 'src', 'src/matlab//');
16%op = path(op);
17
18% before you run this script you need to manually start up matlab and
19% add the src and src/matlab directories to your path
20%
21% or do this:
22%
23% cd test
24% matlab -nodisplay -r path\(path,\'src\'\),path\(path,\'src\/matlab\'\),infile=\'rplib_test.xml\',RpMatlab_test
25
26%path(path,src');
27%path(path,'src/matlab');
28
29lib = rpLib(infile);
30err = test_element(lib,'input.number(min)');
31err = test_element_comp(lib,'input.number(min)');
32err = test_children(lib,'input');
33err = test_children_bytype(lib,'input','number');
34err = test_convert('1m','cm',0);
35err = test_convert('1m','cm',1);
36err = test_convert('1eV','J',1);
37err = test_convert_dbl('1eV','J');
38err = test_convert_str('1eV','J',0);
39err = test_convert_str('1eV','J',1);
40err = test_define_unit('We',0);
41err = test_define_unit('We2',0);
42err = test_find('We');
43err = test_get(lib,'output.curve(result).about.label');
44err = test_get_string(lib,'output.curve(result).about.label');
45err = test_get_basis('cm');
46err = test_get_basis('We');
47err = test_get_double(lib,'input.number(max).current');
48err = test_get_exponent('cm');
49err = test_get_exponent('We2');
50err = test_get_units('We2');
51err = test_get_units_name('We2');
52err = test_make_metric('We2');
53err = test_node_comp(lib,'input.number(min)');
54%err = test_node_comp(0,'input.nur(min)');
55err = test_node_id(lib,'input.number(min)');
56err = test_node_type(lib,'input.number(min)');
57err = test_put(lib,'output.curve(result).xy(f12)','12 13',1);
58err = test_put_dbl(lib,'output.curve(result).xy(f13)',22,1);
59err = test_put_dbl(lib,'output.curve(result).xy(f14)',0,1);
60err = test_put_str(lib,'output.curve(result).xy(f15)','110 111',1);
61err = test_xml(lib);
62err = test_result(lib);
63
64quit;
Note: See TracBrowser for help on using the repository browser.