Changeset 260 for tests

Show
Ignore:
Timestamp:
02/02/09 14:47:34 (15 years ago)
Author:
smidl
Message:

working UI example

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • tests/UI/UIbuilder_test.cpp

    r257 r260  
    2222        UItest():UIbuilder("test"){} 
    2323        bdmroot* build(Setting &S) const{ 
    24                 try{ 
    2524                        int a=S["a"]; 
    2625                        string St; 
     
    2827                        cls* tmp = new cls(a,St); 
    2928                        return tmp; 
    30                 } 
    31                 catch (...){ 
    32                         it_error(string(S.getPath()) + " is not a valid test UI"); 
    33                 } 
    3429        }        
    3530}; 
     
    3934        UItest2():UIbuilder("test2"){} 
    4035        bdmroot* build(Setting &S) const{ 
    41                 try{ 
    4236                        int a=S["a"]; 
    4337                        string St; 
    4438                        S.lookupValue("S",St); 
    4539                        return  new cls2(a,St); 
    46                 } 
    47                 catch (...){ 
    48                         it_error(string(S.getPath()) + " is not a valid test UI"); 
    49                 } 
    5040        }        
    5141        int no(){return 2;}