29 friend inline std::ostream&
operator<<(std::ostream& out,
const __A__&
object) {
return out <<
object.a; }
36 void print(std::ostream& out,
int debug,
const char* title, T __begin, T __end)
43 copy(__begin, __end, ostream_iterator<typename T::value_type>(out,
" "));
56 int main(
int argc,
char **argv)
65 JParser<> zap(
"Auxiliary program to test object selection methods.");
71 catch(
const exception &error) {
72 FATAL(error.what() << endl);
77 buffer.push_back(__A__(3));
78 buffer.push_back(__A__(4));
79 buffer.push_back(__A__(2));
80 buffer.push_back(__A__(1));
81 buffer.push_back(__A__(5));
84 print(cout,
debug,
"data:", buffer.begin(), buffer.end());
91 DEBUG(
"has " <<
x <<
"? " << (p != buffer.end() ?
"yes" :
"no") << endl);
93 ASSERT(p != buffer.end() && p->a ==
x);
99 DEBUG(
"has " <<
x <<
"? " << (p != buffer.end() ?
"yes" :
"no") << endl);
101 ASSERT(p != buffer.end() && p->get() ==
x);
107 print(cout,
debug,
"selection:", buffer.begin(), p);
General purpose messaging.
#define DEBUG(A)
Message macros.
#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.
void copy(const Head &from, JHead &to)
Copy header from from to to.
std::ostream & print(std::ostream &out, const JTestSummary &summary, const char delimiter=' ', const bool useColors=true)
Print test summary.
JPredicate< JResult_t T::*, JComparison::eq > make_predicate(JResult_t T::*member, const JResult_t value)
Helper method to create predicate for data member.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).