1 | % ---------------------------------------------------------------------- |
---|
2 | % TEST: Matlab's Rappture Library Test Functions. |
---|
3 | % |
---|
4 | % [err] = test_element(lib, path) |
---|
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 | function [err] = test_element(lib,path) |
---|
16 | err = 1; |
---|
17 | disp(sprintf('\n\nTESTING rpElement\n')); |
---|
18 | [nodeHandle,err] = rpElement(lib,path); |
---|
19 | if nodeHandle && ~err |
---|
20 | [compStr,err] = rpNodeComp(nodeHandle); |
---|
21 | disp(sprintf ('%s compStr = %s\n', path, compStr)); |
---|
22 | % printf ("err = %i nodeHandle = %i\n",err,nodeHandle); |
---|
23 | |
---|
24 | [idStr, err] = rpNodeId(nodeHandle); |
---|
25 | disp(sprintf ('%s idStr = %s\n', path, idStr)); |
---|
26 | % printf ("err = %i nodeHandle = %i\n",err,nodeHandle); |
---|
27 | |
---|
28 | [typeStr,err] = rpNodeType(nodeHandle); |
---|
29 | disp(sprintf ('%s typeStr = %s\n', path, typeStr)); |
---|
30 | % printf ("err = %i nodeHandle = %i\n",err,nodeHandle); |
---|
31 | else |
---|
32 | disp(sprintf('Error within rpElement function\n')); |
---|
33 | end |
---|
34 | return |
---|