|
|
| constructor (string name, string version, *list< auto > p_argv, *hash< auto > opts) |
| | creates the injected test object
|
| |
|
| constructor (string name, string version, reference< list< string > > p_argv, *hash< auto > opts) |
| | creates the injected test object
|
| |
|
Program | createInjectedProgram (string path) |
| | creates the Program object subject to injection
|
| |
|
| createProgram () |
| | creates the main child Program object subject to injection
|
| |
|
int | getParseOptions () |
| | override this method to affect the parse options that Program objects subject to injection will get
|
| |
|
string | getScriptPath () |
| | Returns the path to the script to be tested.
|
| |
|
abstract string | getScriptPathImpl () |
| | implement this in subclasses to perform all injections
|
| |
|
| injectClass (string class_name, *string new_name) |
| | injects a class
|
| |
|
| injectFunction (string func_name, *string new_name) |
| | injects a function
|
| |
|
| injectUserModule (string module, *code custom_setup, *code custom_parsing) |
| | performs all injections into the given user module
|
| |
|
int | main () |
| | creates the injected program, reloads the source into it, and executes the test
|
| |
|
| performCommonInjections (Program p) |
| | override this method to perform injections common to the primary child logic container and all user module logic containers
|
| |
|
| performInjections () |
| | performs injections
|
| |
|
abstract | performInjectionsImpl () |
| | implement this in subclasses to perform all injections
|
| |
|
| reloadAndCommitProgram () |
| | reloads the test source and finalizes and commits the injected child Program object
|
| |
|
| reloadSelf () |
| | override to supply the source to the current test in case it's not available on the filesystem
|
| |
|
| setReloadedParseOptions (Program p, string file_data) |
| | override to optionally set parse options on the reloaded source
|
| |
| | addTestCase (QUnit::TestCase tc) |
| | adds a test case to run
|
| |
| | addTestCase (string name, code call, *softlist< auto > args) |
| | adds a test case to run
|
| |
| | assertEq (auto expected, auto actual, *string name) |
| | Tests a value for equality to an expected value with hard comparisons (types and values must be identical)
|
| |
| | assertEqSoft (auto expected, auto actual, *string name) |
| | Tests a value for equality to an expected value with soft comparisons (types may differ)
|
| |
| | assertFalse (auto actual, *string name) |
| | Tests a boolean value.
|
| |
| | assertFloatEq (float expected, float actual, float epsilon=DEFAULT_EPSILON, *string name) |
| | Tests a float value for equality to an expected value with an allowed error.
|
| |
| | assertGe (auto expected, auto actual, *string name) |
| | Tests that a value is greater than or equal to an expected value with hard comparisons (types may not differ)
|
| |
| | assertGeSoft (auto expected, auto actual, *string name) |
| | Tests that a value is greater than or equal to than an expected value with soft comparisons (types may differ)
|
| |
| | assertGt (auto expected, auto actual, *string name) |
| | Tests that a value is greater than an expected value with hard comparisons (types may not differ)
|
| |
| | assertGtSoft (auto expected, auto actual, *string name) |
| | Tests that a value is greater than an expected value with soft comparisons (types may differ)
|
| |
|
| assertionOk (*string name) |
| | process an ok assertion
|
| |
| | assertLe (auto expected, auto actual, *string name) |
| | Tests that a value is less than or equal to an expected value with hard comparisons (types may not differ)
|
| |
| | assertLeSoft (auto expected, auto actual, *string name) |
| | Tests that a value is less than or equal to than an expected value with soft comparisons (types may differ)
|
| |
| | assertLt (auto expected, auto actual, *string name) |
| | Tests that a value is less than an expected value with hard comparisons (types may not differ)
|
| |
| | assertLtSoft (auto expected, auto actual, *string name) |
| | Tests that a value is less than an expected value with soft comparisons (types may differ)
|
| |
| | assertNeq (auto expected, auto actual, *string name) |
| | Tests a value for inequality to an expected value with hard comparisons (types and values must be identical)
|
| |
| | assertNeqSoft (auto expected, auto actual, *string name) |
| | Tests a value for inequality to an expected value with soft comparisons (types may differ)
|
| |
| | assertNothing (auto actual, *string name) |
| | Tests for no value.
|
| |
| | assertNRegex (string regex_pattern, string actual, *string name) |
| | Tests that a test value does not pass a regular expression match.
|
| |
| | assertNumberEq (number expected, number actual, number epsilon=DEFAULT_EPSILON, *string name) |
| | Tests a number value for equality to an expected value with an allowed error.
|
| |
| | assertRegex (string regex_pattern, string actual, *string name) |
| | Tests that a test value passes a regular expression match.
|
| |
| | assertSkip (*string name) |
| | Skips assertion on purpose.
|
| |
| | assertThrows (string expectedErr, *string expectedDesc, *hash< auto > arg, code theCode, *softlist< auto > args, *string name) |
| | Tests that a piece of code throws an exception with given description and exception arg keys.
|
| |
| | assertThrows (string expectedErr, *string expectedDesc, code theCode, *softlist< auto > args, *string name) |
| | Tests that a piece of code throws an exception with given description.
|
| |
| | assertThrows (string expectedErr, code theCode, *softlist< auto > args, *string name) |
| | Tests that a piece of code throws an exception.
|
| |
| | assertTrue (auto actual, *string name) |
| | Tests a boolean value.
|
| |
|
| constructor (string name, string version, *list< auto > p_argv, *hash< auto > opts) |
| | creates the object and sets the name of the test
|
| |
|
| constructor (string name, string version, reference< list< string > > p_argv, *hash< auto > opts) |
| | creates the object and sets the name of the test
|
| |
| bool | equals (auto a, auto b) |
| | Compare two values for equality.
|
| |
| bool | equalsIterated (AbstractIterator a, AbstractIterator b) |
| | Compare two iterables, item by item, for equality of each index.
|
| |
| | fail (*string msg) |
| | Fails the test unconditionally.
|
| |
|
*string | getEnv (string key, *string def) |
| | facade for the system environment variables
|
| |
|
TestCase | getTestCase (string meth) |
| | returns the current test case
|
| |
|
| globalSetUp () |
| | global setup; will be called once before tests are run
|
| |
|
| globalTearDown () |
| | global tear down; will be called once after all tests are run
|
| |
|
int | main () |
| | Run the whole suite, report results.
|
| |
| bool | notEquals (auto a, auto b) |
| | Compare two values for inequality.
|
| |
|
string | printUnexpectedData (auto exp, auto act, *bool neg, *bool soft_comparisons, *string comparitor) |
| | Helper function for printing out human-readable comparison of two values.
|
| |
| bool | regexpMatches (string s, string regexp) |
| | Compare a string for match against a regexp.
|
| |
|
| setUp () |
| | Prototype function for setting up test environment. It will be called for each test individually.
|
| |
|
| tearDown () |
| | Prototype function for cleaning up test environemnt. It will be called after each test has executed.
|
| |
| auto | testAssertion (string name, code condition, *softlist< auto > args, binary expectedResultValue) |
| | Tests for a single assertion for a call returning a binary value and returns the value generated.
|
| |
| auto | testAssertion (string name, code condition, *softlist< auto > args, bool expectedResultValue) |
| | Tests for a single assertion for a call returning a boolean value and returns the value generated.
|
| |
| auto | testAssertion (string name, code condition, *softlist< auto > args, date expectedResultValue) |
| | Tests for a single assertion for a call returning a date value and returns the value generated.
|
| |
| auto | testAssertion (string name, code condition, *softlist< auto > args, float expectedResultValue) |
| | Tests for a single assertion for a call returning a floating-point value and returns the value generated.
|
| |
| auto | testAssertion (string name, code condition, *softlist< auto > args, hash< auto > expectedResultValue) |
| | Tests for a single assertion for a call returning a hash value and returns the value generated.
|
| |
| auto | testAssertion (string name, code condition, *softlist< auto > args, int expectedResultValue) |
| | Tests for a single assertion for a call returning an integer value and returns the value generated.
|
| |
| auto | testAssertion (string name, code condition, *softlist< auto > args, list< auto > expectedResultValue) |
| | Tests for a single assertion for a call returning a list value and returns the value generated.
|
| |
| auto | testAssertion (string name, code condition, *softlist< auto > args, number expectedResultValue) |
| | Tests for a single assertion for a call returning an arbitrary-precision numeric value and returns the value generated.
|
| |
| auto | testAssertion (string name, code condition, *softlist< auto > args, QUnit::AbstractTestResult expectedResult=new QUnit::TestResultSuccess()) |
| | Tests for a single assertion and returns the value generated.
|
| |
| auto | testAssertion (string name, code condition, *softlist< auto > args, string expectedResultValue) |
| | Tests for a single assertion for a call returning a string value and returns the value generated.
|
| |
| auto | testAssertionValue (*string name, auto actual, auto expected) |
| | Tests a value for equality to an expected value.
|
| |
| auto | testAssertionValue (*string name, float actual, float expected, float epsilon=DEFAULT_EPSILON) |
| | Tests a value for equality to an expected value of float type.
|
| |
| auto | testAssertionValue (*string name, number actual, number expected, number epsilon=DEFAULT_EPSILON) |
| | Tests a value for equality to an expected value of number type.
|
| |
| | testNullAssertion (string name, code condition, *softlist< auto > args) |
| | Tests for a single assertion for a call returning no value (for example, to ensure that the call does not throw an exception)
|
| |
| | testSkip (string reason) |
| | Skips a given test, eg. because it may be missing some dependencies.
|
| |
| | constructor (string name, string version, *list< auto > p_argv, hash< auto > opts=Opts) |
| | creates the object from the arguments
|
| |
| | constructor (string name, string version, reference< list< string > > p_argv, hash< auto > opts=Opts) |
| | creates the object from the arguments
|
| |