- Timestamp:
- 01/28/09 10:01:18 (16 years ago)
- Location:
- tests
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
tests/CMakeLists.txt
r249 r256 4 4 # Make sure the linker can find the Hello library once it is built. 5 5 link_directories (${BDM_BINARY_DIR}/bdm) 6 7 # Define macro for testing a file8 MACRO(TEST FN)9 add_executable (${FN} ${FN}.cpp)10 target_link_libraries (${FN} debug itpp_debug)11 target_link_libraries (${FN} optimized itpp)12 target_link_libraries (${FN} bdm ${AddLib})13 ENDMACRO(TEST)14 6 15 7 # Add executable called "helloDemo" that is built from the source files -
tests/UI/UIbuilder_test.cpp
r254 r256 5 5 using namespace bdm; 6 6 7 class cls {7 class cls :public bdmroot{ 8 8 public: 9 9 int a; … … 21 21 public: 22 22 UItest():UIbuilder("test"){} 23 void build(Setting &S, void**ret) const{23 void build(Setting &S, bdmroot* &ret) const{ 24 24 try{ 25 25 int a=S["a"]; … … 27 27 S.lookupValue("S",St); 28 28 cls* tmp = new cls(a,St); 29 *ret=tmp;29 ret=tmp; 30 30 } 31 31 catch (...){ … … 38 38 public: 39 39 UItest2():UIbuilder("test2"){} 40 void build(Setting &S, void**ret) const{40 void build(Setting &S, bdmroot* &ret) const{ 41 41 try{ 42 42 int a=S["a"]; … … 44 44 S.lookupValue("S",St); 45 45 cls* tmp = new cls2(a,St); 46 *ret=tmp;46 ret=tmp; 47 47 } 48 48 catch (...){ … … 59 59 60 60 int main(){ 61 62 61 UIFile UI("UIbuilder_test.cfg"); 63 62 64 63 cls* Cls; 65 UIbuild(UI.lookup("test"), &Cls);64 UIbuild(UI.lookup("test"),Cls); 66 65 cls* Cls2; 67 UIbuild(UI.lookup("test2"), &Cls2);66 UIbuild(UI.lookup("test2"),Cls2); 68 67 cls* Cls3; 69 UIbuild(UI.lookup("test3"), &Cls3);68 UIbuild(UI.lookup("test3"),Cls3); 70 69 71 70 Cls->print(); 72 71 Cls2->print(); 73 Cls3->print(); 74 return 0; 72 Cls3->print(); 73 74 delete Cls; 75 delete Cls2; 76 delete Cls3; 75 77 }