141 constructor(
string type);
143 constructor(
string type,
string subType);
175 constructor(
string s) ;
188 constructor(
auto value) ;
201 constructor(
hash value) ;
222 constructor(
string exceptionType) ;
228 constructor(
string exceptionType,
string subType) ;
244 string m_exceptionDetail;
252 constructor(
string exceptionType,
string exceptionDetail) ;
269 string m_exceptionRegexp;
273 constructor(
string exceptionType,
string exceptionRegexp) ;
286 constructor(
string exceptionType,
string exceptionSubstring) ;
310 int num_asserts_ok = 0;
313 int num_asserts_skip = 0;
318 constructor(
string name, code code, *softlist<auto> args);
325 static *
string getStackPos(
list stack);
327 static string getPos(
hash ex);
346 int getAssertionCount();
349 int getAssertionOkCount();
352 int getAssertionSkipCount();
371 const PLAINQUIET = 0;
376 "plainquiet" : PLAINQUIET,
381 const RESULT_TYPE_DESCRIPTION = (
382 TEST_SUCCESS : (
"desc":
"Success",
"junittag" :
NOTHING),
383 TEST_FAILURE : (
"desc":
"FAILURE",
"junittag" :
"failure"),
384 TEST_ERROR : (
"desc":
"ERROR",
"junittag" :
"error"),
385 TEST_SKIPPED : (
"desc":
"Skipped",
"junittag" :
"skipped"),
389 const OffsetColumn = 20;
414 int num_asserts_ok = 0;
417 int num_asserts_skip = 0;
425 "verbose" :
"v,verbose:i+",
427 "format" :
"format=s",
430 const TEST_SUCCESS = 0;
431 const TEST_FAILURE = 1;
432 const TEST_ERROR = 2;
433 const TEST_SKIPPED = 3;
439 printOption(
string left,
string right,
int offset = OffsetColumn);
445 usageIntern(
int offset = OffsetColumn);
457 processOptions(reference<list<string>> p_argv);
467 constructor(
string name,
string version, *reference<list<string>> p_argv,
hash opts = Opts);
472 callPrinterFunction(
string type, *softlist<auto> args);
478 printHeader() { callPrinterFunction(
"header"); } printSummary() { callPrinterFunction(
"summary"); } printTestReport(
hash testcase) { callPrinterFunction(
"testreport", testcase); }
479 printPlaintextHeader();
481 printPlaintextSummary();
483 printPlaintextOneTest(
hash testcase);
500 addTestResult(
TestCase tc,
int success, *
string error, *
string pos, *
string detail);
510 list<TestCase> testCases();
518 constructor(
string name,
string version, *reference<list<string>> p_argv, *
hash opts) ;
534 *
string getEnv(
string key, *
string def);
547 addTestCase(
string name, code call, *softlist<auto> args);
561 string escapeSpecialChars(
string str);
563 bool diffInSpecialCharsOnly(
string a,
string b);
566 string printUnexpectedData(
auto exp,
auto act, *
bool neg, *
bool soft_comparisons);
568 string shorten(
auto value);
570 compare(
auto v1,
auto v2, reference<list<string>> out,
string path, *
bool soft_comparisons);
572 compareHashes(
hash h1,
hash h2, reference<list<string>> out,
string path =
"", *
bool soft_comparisons);
574 compareLists(list<auto> l1, list<auto> l2, reference<list<string>> out,
string path =
"", *
bool soft_comparisons);
592 auto testAssertionValue(*
string name,
auto actual,
auto expected);
604 assertEqSoft(
auto expected,
auto actual, *
string name);
616 assertEq(
auto expected,
auto actual, *
string name);
629 assertFloatEq(
float expected,
float actual,
float epsilon = 0.0000000001, *
string name);
642 assertNumberEq(
number expected,
number actual,
number epsilon = 0.0000000001, *
string name);
653 assertTrue(
auto actual, *
string name);
664 assertFalse(
auto actual, *
string name);
678 assertThrows(
string expectedErr, *
string expectedDesc, code theCode, *softlist<auto> args, *
string name);
691 assertThrows(
string expectedErr, code theCode, *softlist<auto> args, *
string name);
702 assertSkip (*
string name);
726 testNullAssertion(
string name, code condition, *softlist<auto> args);
737 auto testAssertion(
string name, code condition, *softlist<auto> args,
int expectedResultValue);
748 auto testAssertion(
string name, code condition, *softlist<auto> args,
float expectedResultValue);
759 auto testAssertion(
string name, code condition, *softlist<auto> args,
number expectedResultValue);
770 auto testAssertion(
string name, code condition, *softlist<auto> args,
bool expectedResultValue);
781 auto testAssertion(
string name, code condition, *softlist<auto> args,
string expectedResultValue);
792 auto testAssertion(
string name, code condition, *softlist<auto> args,
date expectedResultValue);
803 auto testAssertion(
string name, code condition, *softlist<auto> args,
binary expectedResultValue);
814 auto testAssertion(
string name, code condition, *softlist<auto> args,
hash expectedResultValue);
825 auto testAssertion(
string name, code condition, *softlist<auto> args,
list expectedResultValue);
844 testSkip(
string reason);
855 bool equals(
auto a,
auto b);
865 bool notEquals(
auto a,
auto b);
875 bool regexpMatches(
string s,
string regexp);
885 bool equalsIterated(AbstractIterator a, AbstractIterator b);
895 static string getAssertionName(*
string name);
903 *
string m_testedFile;
907 static bool instantiated =
False;
911 constructor(
string name,
string version, *reference<list<string>> p_argv, *
hash opts) ;
915 setScriptPath(*
string testedFile);
922 Program createInjectedProgram();
924 abstract performInjections(Program p);
925 abstract performModuleInjections();
927 injectIntoModule(
string module);
936 class QUnit::DependencyInjectedTestRunner :
public QUnit::Test {
939 setScriptPath(*
string testedFile) {} injectIntoModule(
string module) {}
940 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:240
Class representing any non-boolean value.
Definition: QUnit.qm.dox.h:185
string m_name
the name of the test case
Definition: QUnit.qm.dox.h:298
A class representing a test with injected dependencies.
Definition: QUnit.qm.dox.h:899
Class representing a partial match of a hash value. Common keys have to be identical.
Definition: QUnit.qm.dox.h:198
tearDown()
Prototype function for cleaning up test environemnt. It will be called after each test has executed...
Definition: QUnit.qm.dox.h:531
Class representing Exception of a particular type and substring for detail.
Definition: QUnit.qm.dox.h:283
An abstract class representing test result interface.
Definition: QUnit.qm.dox.h:132
Class representing Exception of a particular type.
Definition: QUnit.qm.dox.h:210
number number(softnumber n)
Class representing boolean True.
Definition: QUnit.qm.dox.h:149
Class containing the configuration for a test case.
Definition: QUnit.qm.dox.h:293
string m_exceptionType
corresponds to the "err" key of ExceptionInfo (the first value of a throw statement) ...
Definition: QUnit.qm.dox.h:215
setUp()
A prototype function.
Definition: QUnit.qm.dox.h:919
the main namespace for all public definitions in the QUnit module
Definition: QUnit.qm.dox.h:129
hash m_options
the result of parsing command-line options with Qore::GetOpt::parse2()
Definition: QUnit.qm.dox.h:403
Base class for collecting test results and reporting.
Definition: QUnit.qm.dox.h:367
hash m_printMethods
A map of print methods, categorised into three types: header, summary, testreport.
Definition: QUnit.qm.dox.h:392
globalTearDown()
global tear down; will be called once after all tests are run
Definition: QUnit.qm.dox.h:525
string m_name
test case name
Definition: QUnit.qm.dox.h:406
string m_version
test case version
Definition: QUnit.qm.dox.h:408
Class representing Exception of a particular type and matching regexp for detail. ...
Definition: QUnit.qm.dox.h:265
globalSetUp()
global setup; will be called once before tests are run
Definition: QUnit.qm.dox.h:522
setUp()
Prototype function for setting up test environment. It will be called for each test individually...
Definition: QUnit.qm.dox.h:528
code m_code
the body of the test case
Definition: QUnit.qm.dox.h:301
Class representing test function failure, both unspecific and with detail.
Definition: QUnit.qm.dox.h:162
*list< auto > m_args
arguments to the above callable object
Definition: QUnit.qm.dox.h:304
Base class representing a simple test, implements an implicit main() function and all utility functio...
Definition: QUnit.qm.dox.h:505