Added static testing project
This commit is contained in:
31
StaticTestProject/main.cpp
Normal file
31
StaticTestProject/main.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#include <iostream>
|
||||
#include "../Hazelnupp/Hazelnupp.h"
|
||||
|
||||
using namespace Hazelnp;
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
Hazelnupp nupp;
|
||||
|
||||
nupp.SetBriefDescription("This is the testing application for Hazelnupp.");
|
||||
|
||||
nupp.RegisterDescription("--help", "This will display the parameter documentation.");
|
||||
nupp.RegisterDescription("--force", "Just forces it.");
|
||||
nupp.RegisterDescription("--width", "The width of something...");
|
||||
nupp.RegisterDescription("--name", "The names to target");
|
||||
nupp.RegisterDescription("--fruit", "The fruit to use");
|
||||
|
||||
nupp.RegisterAbbreviation("-f", "--force");
|
||||
nupp.RegisterAbbreviation("-w", "--width");
|
||||
nupp.RegisterAbbreviation("-h", "--height");
|
||||
nupp.RegisterAbbreviation("-d", "--depth");
|
||||
|
||||
nupp.RegisterConstraint("--width", ParamConstraint::TypeSafety(DATA_TYPE::FLOAT));
|
||||
nupp.RegisterConstraint("--depth", ParamConstraint::TypeSafety(DATA_TYPE::FLOAT));
|
||||
nupp.RegisterConstraint("--name", ParamConstraint(true, DATA_TYPE::LIST, { "peter", "hannes" }, true));
|
||||
nupp.RegisterConstraint("--fruit", ParamConstraint(true, DATA_TYPE::STRING, {}, true));
|
||||
|
||||
nupp.Parse(argc, argv);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user