aboutsummaryrefslogtreecommitdiff
path: root/src/test/param.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/param.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/test/param.cpp b/src/test/param.cpp
index 0641f90..a4d2824 100644
--- a/src/test/param.cpp
+++ b/src/test/param.cpp
@@ -3,12 +3,16 @@
3 3
4Param::Param() 4Param::Param()
5{ 5{
6 addParam( "name", 's', mkproc( Param::printStuff ), &str ); 6 addHelpBanner("param - A test of the libbu++ parameter systems\n"
7 "Enjoy with care and caution\n\nTest stuff:\n");
8 addParam( "name", 's', mkproc( Param::printStuff ), &str, "Test a param param" );
7 //addParam( "name", &str ); 9 //addParam( "name", &str );
8 addParam( "job", 'U', mkproc( Param::printStuff ) ); 10 addParam( "job", 'U', mkproc( Param::printStuff ), "Test a paramless param" );
9 11
10 // --name=Bobo 12 addHelpBanner("\nInformational:\n");
11 // --job hello 13 addParam( "help", mkproc( ParamProc::help ), "Help!" );
14
15 addHelpBanner("\nThanks for trying my test!\n\n");
12} 16}
13 17
14Param::~Param() 18Param::~Param()
@@ -30,11 +34,13 @@ int Param::printStuff( int argc, char *argv[] )
30 34
31int main( int argc, char *argv[] ) 35int main( int argc, char *argv[] )
32{ 36{
33 printf("Starting...\n"); 37 if( argc == 1 )
38 {
39 printf("You have to enter some parameter, try '--help'\n\n");
40 return 0;
41 }
42
34 Param p; 43 Param p;
35 p.process( argc, argv ); 44 p.process( argc, argv );
36
37 //printf("Calling by hand...\n");
38 //p.printStuff();
39} 45}
40 46