#include #include #include "JLang/JResolve.hh" #include "Jeep/JParser.hh" #include "Jeep/JMessage.hh" namespace { struct __A__ { }; struct __B__; } #define PRINT(OUT, CLASS) OUT << setw(8) << std::left << #CLASS << ' ' << JLANG::JResolve::value << std::endl; /** * \file * * Test of class JLANG::JResolve. * \author mdejong */ int main(int argc, char **argv) { using namespace std; int debug; try { JParser<> zap("Example program to test whetger a class exists."); zap['d'] = make_field(debug) =3; zap(argc, argv); } catch(const exception &error) { FATAL(error.what() << endl); } PRINT(cout, __A__); PRINT(cout, __B__); ASSERT(JLANG::JResolve<__A__>::value == true); ASSERT(JLANG::JResolve<__B__>::value == false); return 0; }