165 constructor(
string type);
167 constructor(
string type,
string subType);
199 constructor(
string s) ;
212 constructor(
auto value) ;
225 constructor(
hash value) ;
246 constructor(
string exceptionType) ;
252 constructor(
string exceptionType,
string subType) ;
268 string m_exceptionDetail;
276 constructor(
string exceptionType,
string exceptionDetail) ;
293 string m_exceptionRegexp;
297 constructor(
string exceptionType,
string exceptionRegexp) ;
310 constructor(
string exceptionType,
string exceptionSubstring) ;
334 int num_asserts_ok = 0;
337 int num_asserts_skip = 0;
342 constructor(
string name, code code, *softlist<auto> args);
349 static list<string> getStackList(
list stack,
bool ok =
False);
351 static string getPos(
hash ex);
370 int getAssertionCount();
373 int getAssertionOkCount();
376 int getAssertionSkipCount();
395 const PLAINQUIET = 0;
400 "plainquiet" : PLAINQUIET,
405 const RESULT_TYPE_DESCRIPTION = (
406 TEST_SUCCESS : (
"desc":
"Success",
"junittag" :
NOTHING),
407 TEST_FAILURE : (
"desc":
"FAILURE",
"junittag" :
"failure"),
408 TEST_ERROR : (
"desc":
"ERROR",
"junittag" :
"error"),
409 TEST_SKIPPED : (
"desc":
"Skipped",
"junittag" :
"skipped"),
413 const OffsetColumn = 20;
438 int num_asserts_ok = 0;
441 int num_asserts_skip = 0;
449 "verbose" :
"v,verbose:i+",
451 "format" :
"format=s",
454 const TEST_SUCCESS = 0;
455 const TEST_FAILURE = 1;
456 const TEST_ERROR = 2;
457 const TEST_SKIPPED = 3;
463 printOption(
string left,
string right,
int offset = OffsetColumn);
469 usageIntern(
int offset = OffsetColumn);
481 processOptions(reference<list<string>> p_argv);
491 constructor(
string name,
string version, *reference<list<string>> p_argv,
hash opts = Opts);
496 callPrinterFunction(
string type, *softlist<auto> args);
502 printHeader() { callPrinterFunction(
"header"); } printSummary() { callPrinterFunction(
"summary"); } printTestReport(
hash testcase) { callPrinterFunction(
"testreport", testcase); }
503 printPlaintextHeader();
505 printPlaintextSummary();
507 printPlaintextOneTest(
hash testcase);
524 addTestResult(
TestCase tc,
int success, *
string error, *
string pos, *
string detail);
534 list<TestCase> testCases();
545 const QUC_NEQ =
"neq";
557 const QUC_NRE =
"nre";
562 QUC_NEQ:
"Not Equal",
563 QUC_GT:
"Greater Than",
564 QUC_GE:
"Greater Than Or Equal To",
566 QUC_LE:
"Less Than Or Equal To",
567 QUC_RE:
"Regular Expression Match",
568 QUC_NRE:
"Negative Regular Expression Match",
572 const DEFAULT_EPSILON = 0.0000000001;
576 constructor(
string name,
string version, *reference<list<string>> p_argv, *
hash opts) ;
592 *
string getEnv(
string key, *
string def);
605 addTestCase(
string name, code call, *softlist<auto> args);
619 string escapeSpecialChars(
string str);
621 bool diffInSpecialCharsOnly(
string a,
string b);
624 string printUnexpectedData(
auto exp,
auto act, *
bool neg, *
bool soft_comparisons, *
string comparitor);
626 string shorten(
auto value);
628 compare(
auto v1,
auto v2, reference<list<string>> out,
string path, *
bool soft_comparisons);
630 compareHashes(
hash h1,
hash h2, reference<list<string>> out,
string path =
"", *
bool soft_comparisons);
632 compareLists(list<auto> l1, list<auto> l2, reference<list<string>> out,
string path =
"", *
bool soft_comparisons);
650 auto testAssertionValue(*
string name,
auto actual,
auto expected);
663 auto testAssertionValue(*
string name,
number actual,
number expected,
number epsilon = DEFAULT_EPSILON);
676 auto testAssertionValue(*
string name,
float actual,
float expected,
float epsilon = DEFAULT_EPSILON);
687 assertRegex(
string regex_pattern,
string actual, *
string name);
699 assertNRegex(
string regex_pattern,
string actual, *
string name);
710 assertNothing(
auto actual, *
string name);
722 assertEqSoft(
auto expected,
auto actual, *
string name);
734 assertNeqSoft(
auto expected,
auto actual, *
string name);
746 assertEq(
auto expected,
auto actual, *
string name);
758 assertNeq(
auto expected,
auto actual, *
string name);
771 assertFloatEq(
float expected,
float actual,
float epsilon = DEFAULT_EPSILON, *
string name);
784 assertNumberEq(
number expected,
number actual,
number epsilon = DEFAULT_EPSILON, *
string name);
796 assertGtSoft(
auto expected,
auto actual, *
string name);
808 assertGt(
auto expected,
auto actual, *
string name);
820 assertGeSoft(
auto expected,
auto actual, *
string name);
832 assertGe(
auto expected,
auto actual, *
string name);
844 assertLtSoft(
auto expected,
auto actual, *
string name);
856 assertLt(
auto expected,
auto actual, *
string name);
868 assertLeSoft(
auto expected,
auto actual, *
string name);
880 assertLe(
auto expected,
auto actual, *
string name);
883 assertionOk(*
string name);
894 assertTrue(
auto actual, *
string name);
905 assertFalse(
auto actual, *
string name);
919 assertThrows(
string expectedErr, *
string expectedDesc, code theCode, *softlist<auto> args, *
string name);
932 assertThrows(
string expectedErr, code theCode, *softlist<auto> args, *
string name);
943 assertSkip (*
string name);
967 testNullAssertion(
string name, code condition, *softlist<auto> args);
978 auto testAssertion(
string name, code condition, *softlist<auto> args,
int expectedResultValue);
989 auto testAssertion(
string name, code condition, *softlist<auto> args,
float expectedResultValue);
1000 auto testAssertion(
string name, code condition, *softlist<auto> args,
number expectedResultValue);
1011 auto testAssertion(
string name, code condition, *softlist<auto> args,
bool expectedResultValue);
1022 auto testAssertion(
string name, code condition, *softlist<auto> args,
string expectedResultValue);
1033 auto testAssertion(
string name, code condition, *softlist<auto> args,
date expectedResultValue);
1044 auto testAssertion(
string name, code condition, *softlist<auto> args,
binary expectedResultValue);
1055 auto testAssertion(
string name, code condition, *softlist<auto> args,
hash expectedResultValue);
1066 auto testAssertion(
string name, code condition, *softlist<auto> args,
list expectedResultValue);
1085 testSkip(
string reason);
1096 bool equals(
auto a,
auto b);
1106 bool notEquals(
auto a,
auto b);
1116 bool regexpMatches(
string s,
string regexp);
1126 bool equalsIterated(AbstractIterator a, AbstractIterator b);
1136 static string getAssertionName(*
string name);
1144 *
string m_testedFile;
1148 static bool instantiated =
False;
1152 constructor(
string name,
string version, *reference<list<string>> p_argv, *
hash opts) ;
1156 setScriptPath(*
string testedFile);
1163 Program createInjectedProgram();
1165 abstract performInjections(Program p);
1166 abstract performModuleInjections();
1168 injectIntoModule(
string module);
1177 class QUnit::DependencyInjectedTestRunner :
public QUnit::Test {
1180 setScriptPath(*
string testedFile) {} injectIntoModule(
string module) {}
1181 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:264
Class representing any non-boolean value.
Definition: QUnit.qm.dox.h:209
string m_name
the name of the test case
Definition: QUnit.qm.dox.h:322
A class representing a test with injected dependencies.
Definition: QUnit.qm.dox.h:1140
Class representing a partial match of a hash value. Common keys have to be identical.
Definition: QUnit.qm.dox.h:222
tearDown()
Prototype function for cleaning up test environemnt. It will be called after each test has executed...
Definition: QUnit.qm.dox.h:589
Class representing Exception of a particular type and substring for detail.
Definition: QUnit.qm.dox.h:307
An abstract class representing test result interface.
Definition: QUnit.qm.dox.h:156
Class representing Exception of a particular type.
Definition: QUnit.qm.dox.h:234
number number(softnumber n)
Class representing boolean True.
Definition: QUnit.qm.dox.h:173
Class containing the configuration for a test case.
Definition: QUnit.qm.dox.h:317
string m_exceptionType
corresponds to the "err" key of ExceptionInfo (the first value of a throw statement) ...
Definition: QUnit.qm.dox.h:239
setUp()
A prototype function.
Definition: QUnit.qm.dox.h:1160
the main namespace for all public definitions in the QUnit module
Definition: QUnit.qm.dox.h:153
hash m_options
the result of parsing command-line options with Qore::GetOpt::parse2()
Definition: QUnit.qm.dox.h:427
Base class for collecting test results and reporting.
Definition: QUnit.qm.dox.h:391
hash m_printMethods
A map of print methods, categorised into three types: header, summary, testreport.
Definition: QUnit.qm.dox.h:416
globalTearDown()
global tear down; will be called once after all tests are run
Definition: QUnit.qm.dox.h:583
string m_name
test case name
Definition: QUnit.qm.dox.h:430
string m_version
test case version
Definition: QUnit.qm.dox.h:432
Class representing Exception of a particular type and matching regexp for detail. ...
Definition: QUnit.qm.dox.h:289
globalSetUp()
global setup; will be called once before tests are run
Definition: QUnit.qm.dox.h:580
setUp()
Prototype function for setting up test environment. It will be called for each test individually...
Definition: QUnit.qm.dox.h:586
code m_code
the body of the test case
Definition: QUnit.qm.dox.h:325
Class representing test function failure, both unspecific and with detail.
Definition: QUnit.qm.dox.h:186
*list< auto > m_args
arguments to the above callable object
Definition: QUnit.qm.dox.h:328
Base class representing a simple test, implements an implicit main() function and all utility functio...
Definition: QUnit.qm.dox.h:529