1 | % ---------------------------------------------------------------------- |
---|
2 | % TEST: Octave's Rappture Library Test Functions. |
---|
3 | % |
---|
4 | % [err] = test_put_dbl_id(libHandle,path,value,id,append) |
---|
5 | % |
---|
6 | % |
---|
7 | % ====================================================================== |
---|
8 | % AUTHOR: Derrick Kearney, Purdue University |
---|
9 | % Copyright (c) 2004-2005 Purdue Research Foundation |
---|
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_put_dbl_id(libHandle,path,value,id,append) |
---|
16 | err = 1; |
---|
17 | printf("\n\nTESTING rpLibPutDoubleId\n"); |
---|
18 | [err] = rpLibPutDoubleId(libHandle,path,value,id,append); |
---|
19 | if !err |
---|
20 | if id != '' |
---|
21 | pathID = [path,'(',id,')']; |
---|
22 | else |
---|
23 | pathID = path; |
---|
24 | end |
---|
25 | |
---|
26 | [retVal, err] = rpLibGetDouble(libHandle,pathID); |
---|
27 | printf ("retVal = %e\n",retVal); |
---|
28 | if !err |
---|
29 | if (retVal == value) |
---|
30 | printf ("rpLibPutDoubleId Successful\n"); |
---|
31 | else |
---|
32 | printf ("rpLibPutDoubleId FAILED\n"); |
---|
33 | end |
---|
34 | else |
---|
35 | printf ("rpLibGetDoubleId returned Error\n"); |
---|
36 | end |
---|
37 | else |
---|
38 | printf("Error within rpLibPutDoubleId\n"); |
---|
39 | end |
---|
40 | end |
---|