#include "tst_cstlcompilerout.h" #include #include void TST_CSTLCompilerOut::test() { { CWF::Variant var(1); QMap objects({{"var", &var}}); QByteArray r = CWF::CSTLCompiler(buildHtml(), QDir().currentPath(), objects, false).output(); QVERIFY2(r.contains("1"), "Should contains '1'"); } } QByteArray TST_CSTLCompilerOut::buildHtml() { QByteArray html; html = ""; html += ""; html += "Um #{var.toInt} + #{var.toInt} = 2"; html += ""; html += ""; html += ""; return html; }