162 constructor(
string type);
164 constructor(
string type,
string subType);
196 constructor(
string s) ;
209 constructor(
auto value) ;
222 constructor(
hash value) ;
243 constructor(
string exceptionType) ;
249 constructor(
string exceptionType,
string subType) ;
265 string m_exceptionDetail;
273 constructor(
string exceptionType,
string exceptionDetail) ;
290 string m_exceptionRegexp;
294 constructor(
string exceptionType,
string exceptionRegexp) ;
307 constructor(
string exceptionType,
string exceptionSubstring) ;
331 int num_asserts_ok = 0;
334 int num_asserts_skip = 0;
339 constructor(
string name, code code, *softlist<auto> args);
346 static list<string> getStackList(
list stack,
bool ok =
False);
348 static string getPos(
hash ex);
367 int getAssertionCount();
370 int getAssertionOkCount();
373 int getAssertionSkipCount();
392 const PLAINQUIET = 0;
397 "plainquiet" : PLAINQUIET,
402 const RESULT_TYPE_DESCRIPTION = (
403 TEST_SUCCESS : (
"desc":
"Success",
"junittag" :
NOTHING),
404 TEST_FAILURE : (
"desc":
"FAILURE",
"junittag" :
"failure"),
405 TEST_ERROR : (
"desc":
"ERROR",
"junittag" :
"error"),
406 TEST_SKIPPED : (
"desc":
"Skipped",
"junittag" :
"skipped"),
410 const OffsetColumn = 20;
435 int num_asserts_ok = 0;
438 int num_asserts_skip = 0;
446 "verbose" :
"v,verbose:i+",
448 "format" :
"format=s",
451 const TEST_SUCCESS = 0;
452 const TEST_FAILURE = 1;
453 const TEST_ERROR = 2;
454 const TEST_SKIPPED = 3;
460 printOption(
string left,
string right,
int offset = OffsetColumn);
466 usageIntern(
int offset = OffsetColumn);
478 processOptions(reference<list<string>> p_argv);
488 constructor(
string name,
string version, *reference<list<string>> p_argv,
hash opts = Opts);
493 callPrinterFunction(
string type, *softlist<auto> args);
499 printHeader() { callPrinterFunction(
"header"); } printSummary() { callPrinterFunction(
"summary"); } printTestReport(
hash testcase) { callPrinterFunction(
"testreport", testcase); }
500 printPlaintextHeader();
502 printPlaintextSummary();
504 printPlaintextOneTest(
hash testcase);
521 addTestResult(
TestCase tc,
int success, *
string error, *
string pos, *
string detail);
531 list<TestCase> testCases();
542 const QUC_NEQ =
"neq";
554 const QUC_NRE =
"nre";
559 QUC_NEQ:
"Not Equal",
560 QUC_GT:
"Greater Than",
561 QUC_GE:
"Greater Than Or Equal To",
563 QUC_LE:
"Less Than Or Equal To",
564 QUC_RE:
"Regular Expression Match",
565 QUC_NRE:
"Negative Regular Expression Match",
569 const DEFAULT_EPSILON = 0.0000000001;
573 constructor(
string name,
string version, *reference<list<string>> p_argv, *
hash opts) ;
589 *
string getEnv(
string key, *
string def);
602 addTestCase(
string name, code call, *softlist<auto> args);
616 string escapeSpecialChars(
string str);
618 bool diffInSpecialCharsOnly(
string a,
string b);
621 string printUnexpectedData(
auto exp,
auto act, *
bool neg, *
bool soft_comparisons, *
string comparitor);
623 string shorten(
auto value);
625 compare(
auto v1,
auto v2, reference<list<string>> out,
string path, *
bool soft_comparisons);
627 compareHashes(
hash h1,
hash h2, reference<list<string>> out,
string path =
"", *
bool soft_comparisons);
629 compareLists(list<auto> l1, list<auto> l2, reference<list<string>> out,
string path =
"", *
bool soft_comparisons);
647 auto testAssertionValue(*
string name,
auto actual,
auto expected);
660 auto testAssertionValue(*
string name,
number actual,
number expected,
number epsilon = DEFAULT_EPSILON);
673 auto testAssertionValue(*
string name,
float actual,
float expected,
float epsilon = DEFAULT_EPSILON);
684 assertRegex(
string regex_pattern,
string actual, *
string name);
696 assertNRegex(
string regex_pattern,
string actual, *
string name);
707 assertNothing(
auto actual, *
string name);
719 assertEqSoft(
auto expected,
auto actual, *
string name);
731 assertNeqSoft(
auto expected,
auto actual, *
string name);
743 assertEq(
auto expected,
auto actual, *
string name);
755 assertNeq(
auto expected,
auto actual, *
string name);
768 assertFloatEq(
float expected,
float actual,
float epsilon = DEFAULT_EPSILON, *
string name);
781 assertNumberEq(
number expected,
number actual,
number epsilon = DEFAULT_EPSILON, *
string name);
793 assertGtSoft(
auto expected,
auto actual, *
string name);
805 assertGt(
auto expected,
auto actual, *
string name);
817 assertGeSoft(
auto expected,
auto actual, *
string name);
829 assertGe(
auto expected,
auto actual, *
string name);
841 assertLtSoft(
auto expected,
auto actual, *
string name);
853 assertLt(
auto expected,
auto actual, *
string name);
865 assertLeSoft(
auto expected,
auto actual, *
string name);
877 assertLe(
auto expected,
auto actual, *
string name);
880 assertionOk(*
string name);
891 assertTrue(
auto actual, *
string name);
902 assertFalse(
auto actual, *
string name);
916 assertThrows(
string expectedErr, *
string expectedDesc, code theCode, *softlist<auto> args, *
string name);
929 assertThrows(
string expectedErr, code theCode, *softlist<auto> args, *
string name);
940 assertSkip (*
string name);
964 testNullAssertion(
string name, code condition, *softlist<auto> args);
975 auto testAssertion(
string name, code condition, *softlist<auto> args,
int expectedResultValue);
986 auto testAssertion(
string name, code condition, *softlist<auto> args,
float expectedResultValue);
997 auto testAssertion(
string name, code condition, *softlist<auto> args,
number expectedResultValue);
1008 auto testAssertion(
string name, code condition, *softlist<auto> args,
bool expectedResultValue);
1019 auto testAssertion(
string name, code condition, *softlist<auto> args,
string expectedResultValue);
1030 auto testAssertion(
string name, code condition, *softlist<auto> args,
date expectedResultValue);
1041 auto testAssertion(
string name, code condition, *softlist<auto> args,
binary expectedResultValue);
1052 auto testAssertion(
string name, code condition, *softlist<auto> args,
hash expectedResultValue);
1063 auto testAssertion(
string name, code condition, *softlist<auto> args,
list expectedResultValue);
1082 testSkip(
string reason);
1093 bool equals(
auto a,
auto b);
1103 bool notEquals(
auto a,
auto b);
1113 bool regexpMatches(
string s,
string regexp);
1123 bool equalsIterated(AbstractIterator a, AbstractIterator b);
1133 static string getAssertionName(*
string name);
1141 *
string m_testedFile;
1145 static bool instantiated =
False;
1149 constructor(
string name,
string version, *reference<list<string>> p_argv, *
hash opts) ;
1153 setScriptPath(*
string testedFile);
1160 Program createInjectedProgram();
1162 abstract performInjections(Program p);
1163 abstract performModuleInjections();
1165 injectIntoModule(
string module);
1174 class QUnit::DependencyInjectedTestRunner :
public QUnit::Test {
1177 setScriptPath(*
string testedFile) {} injectIntoModule(
string module) {}
1178 constructor(
string name,
string version, *reference<list<string>> p_argv, *
hash opts) ;
nothing rename(string old_path, string new_path)
Class representing Exception of a particular type with a particular detail message.
Definition: QUnit.qm.dox.h:261
Class representing any non-boolean value.
Definition: QUnit.qm.dox.h:206
string m_name
the name of the test case
Definition: QUnit.qm.dox.h:319
A class representing a test with injected dependencies.
Definition: QUnit.qm.dox.h:1137
Class representing a partial match of a hash value. Common keys have to be identical.
Definition: QUnit.qm.dox.h:219
tearDown()
Prototype function for cleaning up test environemnt. It will be called after each test has executed...
Definition: QUnit.qm.dox.h:586
Class representing Exception of a particular type and substring for detail.
Definition: QUnit.qm.dox.h:304
An abstract class representing test result interface.
Definition: QUnit.qm.dox.h:153
Class representing Exception of a particular type.
Definition: QUnit.qm.dox.h:231
number number(softnumber n)
Class representing boolean True.
Definition: QUnit.qm.dox.h:170
Class containing the configuration for a test case.
Definition: QUnit.qm.dox.h:314
string m_exceptionType
corresponds to the "err" key of ExceptionInfo (the first value of a throw statement) ...
Definition: QUnit.qm.dox.h:236
setUp()
A prototype function.
Definition: QUnit.qm.dox.h:1157
the main namespace for all public definitions in the QUnit module
Definition: QUnit.qm.dox.h:150
hash m_options
the result of parsing command-line options with Qore::GetOpt::parse2()
Definition: QUnit.qm.dox.h:424
Base class for collecting test results and reporting.
Definition: QUnit.qm.dox.h:388
hash m_printMethods
A map of print methods, categorised into three types: header, summary, testreport.
Definition: QUnit.qm.dox.h:413
globalTearDown()
global tear down; will be called once after all tests are run
Definition: QUnit.qm.dox.h:580
string m_name
test case name
Definition: QUnit.qm.dox.h:427
string m_version
test case version
Definition: QUnit.qm.dox.h:429
Class representing Exception of a particular type and matching regexp for detail. ...
Definition: QUnit.qm.dox.h:286
globalSetUp()
global setup; will be called once before tests are run
Definition: QUnit.qm.dox.h:577
setUp()
Prototype function for setting up test environment. It will be called for each test individually...
Definition: QUnit.qm.dox.h:583
code m_code
the body of the test case
Definition: QUnit.qm.dox.h:322
Class representing test function failure, both unspecific and with detail.
Definition: QUnit.qm.dox.h:183
*list< auto > m_args
arguments to the above callable object
Definition: QUnit.qm.dox.h:325
Base class representing a simple test, implements an implicit main() function and all utility functio...
Definition: QUnit.qm.dox.h:526