| 398 | #endif |
| 399 | |
| 400 | void Tester::testFunction(Script& s) |
| 401 | { |
| 402 | TreeEvaluator te(*nullreport); |
| 403 | //If a test function exists check it returns true |
| 404 | QList<Argument*> args; |
| 405 | Callback* c = addCallback("test",s,args); |
| 406 | s.accept(te); |
| 407 | auto* v = dynamic_cast<BooleanValue*>(c->getResult()); |
| 408 | if(v && v->isTrue()) { |
| 409 | writePass(); |
| 410 | passcount++; |
| 411 | } else { |
| 412 | writeFail(); |
| 413 | failcount++; |
| 414 | } |
| 415 | delete v; |
| 416 | |
| 417 | Node* n=te.getRootNode(); |
| 418 | delete n; |
| 419 | } |
| 420 | |
| 421 | void Tester::testModule(Script& s,const QFileInfo& file) |
| 422 | { |
nothing calls this directly
no test coverage detected