%description: Tests cMsgPar's basic data types (string,bool,long,double). %global: #include %activity: cMsgPar p; #define PRINT(X) EV << p.getType() << ":" << p.isNumeric() << ":" << X << endl p.setBoolValue(false); PRINT(p.boolValue()); p.setBoolValue(true); PRINT(p.boolValue()); p.setLongValue(0); PRINT(p.longValue()); p.setLongValue(-1); PRINT(p.longValue()); p.setLongValue(1); PRINT(p.longValue()); p.setDoubleValue(0.0); PRINT(p.doubleValue()); p.setDoubleValue(3.1415); PRINT(p.doubleValue()); p.setDoubleValue(-1.234); PRINT(p.doubleValue()); char buf[100]; strcpy(buf,"abcd"); // short string p.setStringValue(buf); buf[0]='\0'; PRINT(p.stringValue()); strcpy(buf,"12345678901234567890123456789012345678901234567890"); // long string p.setStringValue(buf); buf[0]='\0'; PRINT(p.stringValue()); EV << "." << endl; %contains: stdout B:1:0 B:1:1 L:1:0 L:1:-1 L:1:1 D:1:0 D:1:3.1415 D:1:-1.234 S:0:abcd S:0:12345678901234567890123456789012345678901234567890 .