60 constructor(
string type);
62 constructor(
string type,
string subType);
66 abstract public string toString();
80 public string toString();
98 constructor(
string s) ;
105 public string toString();
113 constructor(any value) ;
120 public string toString();
128 constructor(
hash value) ;
134 public string toString();
151 constructor(
string exceptionType) ;
155 private constructor(
string exceptionType,
string subType) ;
163 public string toString();
172 string m_exceptionDetail;
180 constructor(
string exceptionType,
string exceptionDetail) ;
187 public string toString();
199 string m_exceptionRegexp;
203 constructor(
string exceptionType,
string exceptionRegexp) ;
210 public string toString();
218 constructor(
string exceptionType,
string exceptionSubstring) ;
221 public string toString();
243 int num_asserts_ok = 0;
246 int num_asserts_skip = 0;
251 constructor(
string name, code code, *softlist args);
258 static *
string getStackPos(
list stack);
260 static string getPos(
hash ex);
279 int getAssertionCount();
282 int getAssertionOkCount();
285 int getAssertionSkipCount();
304 const PLAINQUIET = 0;
309 "plainquiet" : PLAINQUIET,
314 const RESULT_TYPE_DESCRIPTION = (
315 TEST_SUCCESS : (
"desc":
"Success",
"junittag" :
NOTHING),
316 TEST_FAILURE : (
"desc":
"FAILURE",
"junittag" :
"failure"),
317 TEST_ERROR : (
"desc":
"ERROR",
"junittag" :
"error"),
318 TEST_SKIPPED : (
"desc":
"Skipped",
"junittag" :
"skipped"),
322 const OffsetColumn = 20;
347 int num_asserts_ok = 0;
350 int num_asserts_skip = 0;
358 "verbose" :
"v,verbose:i+",
360 "format" :
"format=s",
363 const TEST_SUCCESS = 0;
364 const TEST_FAILURE = 1;
365 const TEST_ERROR = 2;
366 const TEST_SKIPPED = 3;
370 private printOption(
string left,
string right,
int offset = OffsetColumn);
373 private usageIntern(
int offset = OffsetColumn);
379 private processOptions(reference p_argv);
388 constructor(
string name,
string version, *reference p_argv,
hash opts = Opts);
391 private callPrinterFunction(
string type, *softlist args);
394 private printHeader() { callPrinterFunction(
"header"); }
395 private printSummary() { callPrinterFunction(
"summary"); }
396 private printTestReport(
hash testcase) { callPrinterFunction(
"testreport", testcase); }
398 private printPlaintextHeader();
401 private printPlaintextSummary();
404 private printPlaintextOneTest(
hash testcase);
407 private printJunitSummary();
423 addTestResult(
TestCase tc,
int success, *
string error, *
string pos, *
string detail);
441 constructor(
string name,
string version, *reference p_argv, *
hash opts) ;
457 *
string getEnv(
string key, *
string def);
470 addTestCase(
string name, code call, *softlist args);
485 private string printUnexpectedData(any
exp, any act, *
bool neg, *
bool soft_comparisons);
488 private string shorten(any value);
491 private compare(any v1, any v2, reference out,
string path, *
bool soft_comparisons);
494 private compareHashes(
hash h1,
hash h2, reference out,
string path =
"", *
bool soft_comparisons);
497 private compareLists(
list l1,
list l2, reference out,
string path =
"", *
bool soft_comparisons);
516 public any testAssertionValue(*
string name, any actual, any expected);
529 public assertEqSoft(any expected, any actual, *
string name);
542 public assertEq(any expected, any actual, *
string name);
556 public assertFloatEq(
float expected,
float actual,
float epsilon = 0.0000000001, *
string name);
570 public assertNumberEq(
number expected,
number actual,
number epsilon = 0.0000000001, *
string name);
582 public assertTrue(any actual, *
string name);
594 public assertFalse(any actual, *
string name);
608 public assertThrows(
string expectedErr, *
string expectedDesc, code theCode, *softlist args, *
string name);
621 public assertThrows(
string expectedErr, code theCode, *softlist args, *
string name);
633 public assertSkip (*
string name);
648 public fail(*
string msg);
659 public testNullAssertion(
string name, code condition, *softlist args);
671 public any testAssertion(
string name, code condition, *softlist args,
int expectedResultValue);
683 public any testAssertion(
string name, code condition, *softlist args,
float expectedResultValue);
695 public any testAssertion(
string name, code condition, *softlist args,
number expectedResultValue);
707 public any testAssertion(
string name, code condition, *softlist args,
bool expectedResultValue);
719 public any testAssertion(
string name, code condition, *softlist args,
string expectedResultValue);
731 public any testAssertion(
string name, code condition, *softlist args,
date expectedResultValue);
743 public any testAssertion(
string name, code condition, *softlist args,
binary expectedResultValue);
755 public any testAssertion(
string name, code condition, *softlist args,
hash expectedResultValue);
767 public any testAssertion(
string name, code condition, *softlist args,
list expectedResultValue);
789 public testSkip(
string reason);
801 bool equals(any a, any b);
811 bool notEquals(any a, any b);
821 bool regexpMatches(
string s,
string regexp);
831 bool equalsIterated(AbstractIterator a, AbstractIterator b);
841 static string getAssertionName(*
string name);
849 *
string m_testedFile;
853 static bool instantiated =
False;
857 constructor(
string name,
string version, *reference p_argv, *
hash opts) ;
861 setScriptPath(*
string testedFile);
868 private Program createInjectedProgram();
871 abstract performInjections(Program p);
872 abstract performModuleInjections();
874 private injectIntoModule(
string module);
884 class QUnit::DependencyInjectedTestRunner :
public QUnit::Test {
887 public setScriptPath(*
string testedFile) {}
888 private injectIntoModule(
string module) {}
890 constructor(
string name,
string version, *reference 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:168
Class representing any non-boolean value.
Definition: QUnit.qm.dox.h:110
string m_name
the name of the test case
Definition: QUnit.qm.dox.h:231
A class representing a test with injected dependencies.
Definition: QUnit.qm.dox.h:845
Class representing a partial match of a hash value. Common keys have to be identical.
Definition: QUnit.qm.dox.h:125
tearDown()
Prototype function for cleaning up test environemnt. It will be called after each test has executed...
Definition: QUnit.qm.dox.h:454
Class representing Exception of a particular type and substring for detail.
Definition: QUnit.qm.dox.h:215
An abstract class representing test result interface.
Definition: QUnit.qm.dox.h:51
Class representing Exception of a particular type.
Definition: QUnit.qm.dox.h:139
number number(softnumber n)
Class representing boolean True.
Definition: QUnit.qm.dox.h:70
Class containing the configuration for a test case.
Definition: QUnit.qm.dox.h:226
string m_exceptionType
corresponds to the "err" key of an exception hash (the first value of a throw statement) ...
Definition: QUnit.qm.dox.h:144
setUp()
A prototype function.
Definition: QUnit.qm.dox.h:865
the main namespace for all public definitions in the QUnit module
Definition: QUnit.qm.dox.h:48
hash m_options
the result of parsing command-line options with Qore::GetOpt::parse2()
Definition: QUnit.qm.dox.h:336
Base class for collecting test results and reporting.
Definition: QUnit.qm.dox.h:300
hash m_printMethods
A map of print methods, categorised into three types: header, summary, testreport.
Definition: QUnit.qm.dox.h:325
globalTearDown()
global tear down; will be called once after all tests are run
Definition: QUnit.qm.dox.h:448
string m_name
test case name
Definition: QUnit.qm.dox.h:339
string m_version
test case version
Definition: QUnit.qm.dox.h:341
Class representing Exception of a particular type and matching regexp for detail. ...
Definition: QUnit.qm.dox.h:195
globalSetUp()
global setup; will be called once before tests are run
Definition: QUnit.qm.dox.h:445
setUp()
Prototype function for setting up test environment. It will be called for each test individually...
Definition: QUnit.qm.dox.h:451
*list m_args
arguments to the above callable object
Definition: QUnit.qm.dox.h:237
code m_code
the body of the test case
Definition: QUnit.qm.dox.h:234
Class representing test function failure, both unspecific and with detail.
Definition: QUnit.qm.dox.h:85
Base class representing a simple test, implements an implicit main() function and all utility functio...
Definition: QUnit.qm.dox.h:428