source: branches/uq/oldtest/src/RpVariable_test.cc @ 4644

Last change on this file since 4644 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 * ======================================================================
3 *  Copyright (c) 2004-2012  HUBzero Foundation, LLC
4 *
5 *  See the file "license.terms" for information on usage and
6 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
7 * ======================================================================
8 */
9#include "RpVariable.h"
10
11int test_getPath(RpVariable* myVariable);
12int test_getDefaultValue(RpVariable* myVariable);
13int test_getCurrentValue(RpVariable* myVariable);
14int test_getLabel(RpVariable* myVariable);
15int test_getDesc(RpVariable* myVariable);
16
17int test_getPath(RpVariable* myVariable)
18{
19    std::cout << "Path " << myVariable->getPath() << std::endl;
20
21    return 1;
22}
23
24int test_getDefaultValue(RpVariable* myVariable)
25{
26    std::cout << "defaultVal " << *((double*) myVariable->getDefaultValue()) << std::endl;
27
28    return 1;
29}
30
31int test_getCurrentValue(RpVariable* myVariable)
32{
33    std::cout << "currentVal " << myVariable->getCurrentValue() << std::endl;
34
35    return 1;
36}
37
38int test_getLabel(RpVariable* myVariable)
39{
40    std::cout << "label " << myVariable->getLabel() << std::endl;
41
42    return 1;
43}
44
45int test_getDesc(RpVariable* myVariable)
46{
47    std::cout << "desc " << myVariable->getDesc() << std::endl;
48
49    return 1;
50}
51
52
53
54int main ()
55{
56
57    RpVariable* T1 = new RpVariable("input.(ambient).(temperature)",new double(300.00));
58    /*
59    RpVariable* T2 = new RpVariable("input.(ambient).(temperature)",
60                                "K",
61                                300.00,
62                                0.00,
63                                1000.00,
64                                "Temperature",
65                                "Ambient Temperature, value between 0 and 1000"
66                                );
67    */
68   
69    test_getPath(T1);
70    test_getDefaultValue(T1);
71//    test_getCurrentValue(T1);
72    test_getLabel(T1);
73    test_getDesc(T1);
74
75    std::cout << std::endl;
76
77    /*
78    test_getPath(T2);
79    test_getUnits(T2);
80    test_getDefaultValue(T2);
81    test_getCurrentValue(T2);
82    test_getMin(T2);
83    test_getMax(T2);
84    test_getLabel(T2);
85    test_getDesc(T2);
86    */
87
88    std::cout << std::endl;
89
90    return 0;
91}
Note: See TracBrowser for help on using the repository browser.