21 int main(
int argc,
char **argv)
30 JParser<> zap(
"Example program to test router.");
36 catch(
const exception &error) {
37 FATAL(error.what() << endl);
47 for (
int i = 1; i <= 1000000; i *= 10) {
51 for (
size_t i = 0; i != buffer.size(); ++i) {
52 router.put(buffer[i], i);
55 ASSERT(!router.in_range(0),
"Test of router range.");
56 ASSERT(!router.has(2),
"Test of router has.");
58 for (
int i = 1; i <= 1000000; i *= 10) {
59 ASSERT(router.in_range(i),
"Test of router range.");
60 ASSERT(router.has(i),
"Test of router has.");
61 ASSERT(buffer[router.get(i)] == i,
"Test of router lookup.");
69 for (
int i = 1000000; i >= 1; i /= 10) {
73 for (
size_t i = 0; i != buffer.size(); ++i) {
74 router.put(buffer[i], i);
77 ASSERT(!router.in_range(0),
"Test of router range.");
78 ASSERT(!router.has(2),
"Test of router has.");
80 for (
int i = 1000000; i >= 1; i /= 10) {
81 ASSERT(router.in_range(i),
"Test of router range.");
82 ASSERT(router.has(i),
"Test of router has.");
83 ASSERT(buffer[router.get(i)] == i,
"Test of router.");
General purpose messaging.
#define ASSERT(A,...)
Assert macro.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
int main(int argc, char **argv)
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).