Qore jni Module
1.0.1
|
Base class (wrapping the Qore QUnit::Test class) representing a simple test, implements an implicit main() method and all utility methods for testing. More...
Public Member Methods | |
Test (String name, String version) throws Throwable | |
creates the object and sets the name of the test | |
void | globalSetUp () throws Throwable |
global setup; will be called once before tests are run | |
void | globalTearDown () throws Throwable |
global tear down; will be called once after all tests are run | |
void | setUp () throws Throwable |
Prototype method for setting up test environment. It will be called for each test individually. | |
void | tearDown () throws Throwable |
Prototype method for cleaning up test environemnt. It will be called after each test has executed. | |
String | getEnv (String key, String def) throws Throwable |
facade for the system environment variables | |
void | addTestCase (String name, TestCode call) throws Throwable |
adds a test case to run More... | |
void | addTestCase (String name, TestCodeArgs call, Object... args) throws Throwable |
adds a test case to run More... | |
Object | testAssertionValue (String name, Object actual, Object expected) throws Throwable |
Tests a value for equality to an expected value. More... | |
Object | testAssertionValue (String name, BigDecimal actual, BigDecimal expected, BigDecimal epsilon) throws Throwable |
Tests a value for equality to an expected value of number type. More... | |
Object | testAssertionValue (String name, BigDecimal actual, BigDecimal expected) throws Throwable |
Tests a value for equality to an expected value of number type. More... | |
Object | testAssertionValue (String name, float actual, float expected, float epsilon) throws Throwable |
Tests a value for equality to an expected value of float type. More... | |
Object | testAssertionValue (String name, float actual, float expected) throws Throwable |
Tests a value for equality to an expected value of float type. More... | |
void | assertRegex (String regex_pattern, String actual, String name) throws Throwable |
Tests that a test value passes a regular expression match. More... | |
void | assertRegex (String regex_pattern, String actual) throws Throwable |
Tests that a test value passes a regular expression match. More... | |
void | assertNRegex (String regex_pattern, String actual, String name) throws Throwable |
Tests that a test value does not pass a regular expression match. More... | |
void | assertNothing (Object actual, String name) throws Throwable |
Tests for no value. More... | |
void | assertNothing (Object actual) throws Throwable |
Tests for no value. More... | |
void | assertEqSoft (Object expected, Object actual, String name) throws Throwable |
Tests a value for equality to an expected value with soft comparisons (types may differ) More... | |
void | assertEqSoft (Object expected, Object actual) throws Throwable |
Tests a value for equality to an expected value with soft comparisons (types may differ) More... | |
void | assertNeqSoft (Object expected, Object actual, String name) throws Throwable |
Tests a value for inequality to an expected value with soft comparisons (types may differ) More... | |
void | assertNeqSoft (Object expected, Object actual) throws Throwable |
Tests a value for inequality to an expected value with soft comparisons (types may differ) More... | |
void | assertEq (Object expected, Object actual, String name) throws Throwable |
Tests a value for equality to an expected value with hard comparisons (types and values must be identical) More... | |
void | assertEq (Object expected, Object actual) throws Throwable |
Tests a value for equality to an expected value with hard comparisons (types and values must be identical) More... | |
void | assertNeq (Object expected, Object actual, String name) throws Throwable |
Tests a value for inequality to an expected value with hard comparisons (types and values must be identical) More... | |
void | assertNeq (Object expected, Object actual) throws Throwable |
Tests a value for inequality to an expected value with hard comparisons (types and values must be identical) More... | |
void | assertFloatEq (float expected, float actual, float epsilon, String name) throws Throwable |
Tests a float value for equality to an expected value with an allowed error. More... | |
void | assertFloatEq (float expected, float actual, float epsilon) throws Throwable |
Tests a float value for equality to an expected value with an allowed error. More... | |
void | assertFloatEq (float expected, float actual) throws Throwable |
Tests a float value for equality to an expected value with an allowed error. More... | |
void | assertNumberEq (BigDecimal expected, BigDecimal actual, BigDecimal epsilon, String name) throws Throwable |
Tests a number value for equality to an expected value with an allowed error. More... | |
void | assertNumberEq (BigDecimal expected, BigDecimal actual, BigDecimal epsilon) throws Throwable |
Tests a number value for equality to an expected value with an allowed error. More... | |
void | assertNumberEq (BigDecimal expected, BigDecimal actual) throws Throwable |
Tests a number value for equality to an expected value with an allowed error. More... | |
void | assertGtSoft (Object expected, Object actual, String name) throws Throwable |
Tests that a value is greater than an expected value with soft comparisons (types may differ) More... | |
void | assertGtSoft (Object expected, Object actual) throws Throwable |
Tests that a value is greater than an expected value with soft comparisons (types may differ) More... | |
void | assertGt (Object expected, Object actual, String name) throws Throwable |
Tests that a value is greater than an expected value with hard comparisons (types may not differ) More... | |
void | assertGt (Object expected, Object actual) throws Throwable |
Tests that a value is greater than an expected value with hard comparisons (types may not differ) More... | |
void | assertGeSoft (Object expected, Object actual, String name) throws Throwable |
Tests that a value is greater than or equal to than an expected value with soft comparisons (types may differ) More... | |
void | assertGeSoft (Object expected, Object actual) throws Throwable |
Tests that a value is greater than or equal to than an expected value with soft comparisons (types may differ) More... | |
void | assertGe (Object expected, Object actual, String name) throws Throwable |
Tests that a value is greater than or equal to an expected value with hard comparisons (types may not differ) More... | |
void | assertGe (Object expected, Object actual) throws Throwable |
Tests that a value is greater than or equal to an expected value with hard comparisons (types may not differ) More... | |
void | assertLtSoft (Object expected, Object actual, String name) throws Throwable |
Tests that a value is less than an expected value with soft comparisons (types may differ) More... | |
void | assertLtSoft (Object expected, Object actual) throws Throwable |
Tests that a value is less than an expected value with soft comparisons (types may differ) More... | |
void | assertLt (Object expected, Object actual, String name) throws Throwable |
Tests that a value is less than an expected value with hard comparisons (types may not differ) More... | |
void | assertLt (Object expected, Object actual) throws Throwable |
Tests that a value is less than an expected value with hard comparisons (types may not differ) More... | |
void | assertLeSoft (Object expected, Object actual, String name) throws Throwable |
Tests that a value is less than or equal to than an expected value with soft comparisons (types may differ) More... | |
void | assertLeSoft (Object expected, Object actual) throws Throwable |
Tests that a value is less than or equal to than an expected value with soft comparisons (types may differ) More... | |
void | assertLe (Object expected, Object actual, String name) throws Throwable |
Tests that a value is less than or equal to an expected value with hard comparisons (types may not differ) More... | |
void | assertLe (Object expected, Object actual) throws Throwable |
Tests that a value is less than or equal to an expected value with hard comparisons (types may not differ) More... | |
void | assertTrue (Object actual, String name) throws Throwable |
Tests a boolean value. More... | |
void | assertTrue (Object actual) throws Throwable |
Tests a boolean value. More... | |
void | assertFalse (Object actual, String name) throws Throwable |
Tests a boolean value. More... | |
void | assertFalse (Object actual) throws Throwable |
Tests a boolean value. More... | |
void | assertThrows (String expectedErr, String expectedDesc, TestCodeArgs theCode, Object[] args, String name) throws Throwable |
Tests that a piece of code throws an exception with given description. More... | |
void | assertThrows (String expectedErr, String expectedDesc, TestCodeArgs theCode, Object[] args) throws Throwable |
Tests that a piece of code throws an exception with given description. More... | |
void | assertThrows (String expectedErr, String expectedDesc, TestCodeArgs theCode) throws Throwable |
Tests that a piece of code throws an exception with given description. More... | |
void | assertThrows (String expectedErr, TestCodeArgs theCode, Object[] args, String name) throws Throwable |
Tests that a piece of code throws an exception with given description. More... | |
void | assertThrows (String expectedErr, TestCodeArgs theCode, Object[] args) throws Throwable |
Tests that a piece of code throws an exception with given description. More... | |
void | assertThrows (String expectedErr, String expectedDesc, TestCode theCode, String name) throws Throwable |
Tests that a piece of code throws an exception with given description. More... | |
void | assertThrows (String expectedErr, String expectedDesc, TestCode theCode) throws Throwable |
Tests that a piece of code throws an exception with given description. More... | |
void | assertThrows (String expectedErr, TestCode theCode, String name) throws Throwable |
Tests that a piece of code throws an exception with given description. More... | |
void | assertThrows (String expectedErr, TestCode theCode) throws Throwable |
Tests that a piece of code throws an exception with given description. More... | |
void | assertSkip (String name) throws Throwable |
Skips assertion on purpose. More... | |
void | fail (String msg) throws Throwable |
Fails the test unconditionally. More... | |
void | testNullAssertion (String name, TestConditionArgs condition, Object... args) throws Throwable |
Tests for a single assertion for a call returning no value (for example, to ensure that the call does not throw an exception) More... | |
Object | testAssertion (String name, TestConditionArgs condition, Object[] args, Object expectedResultValue) throws Throwable |
Tests for a single assertion for a call returning an integer value and returns the value generated. More... | |
void | testNullAssertion (String name, TestCondition condition) throws Throwable |
Tests for a single assertion for a call returning no value (for example, to ensure that the call does not throw an exception) More... | |
Object | testAssertion (String name, TestCondition condition, Object expectedResultValue) throws Throwable |
Tests for a single assertion for a call returning an integer value and returns the value generated. More... | |
Object | testAssertion (String name, TestConditionArgs condition, Object[] args, AbstractTestResult expectedResult) throws Throwable |
Tests for a single assertion and returns the value generated. More... | |
Object | testAssertion (String name, TestConditionArgs condition, Object[] args) throws Throwable |
Tests for a single assertion and returns the value generated. More... | |
Object | testAssertion (String name, TestCondition condition, AbstractTestResult expectedResult) throws Throwable |
Tests for a single assertion and returns the value generated. More... | |
Object | testAssertion (String name, TestCondition condition) throws Throwable |
Tests for a single assertion and returns the value generated. More... | |
void | testSkip (String reason, Object... args) throws Throwable |
Skips a given test, eg. because it may be missing some dependencies. More... | |
void | testSkip (String reason) throws Throwable |
Skips a given test, eg. because it may be missing some dependencies. More... | |
boolean | equals (Object a, Object b) throws Throwable |
Compare two values for equality. More... | |
boolean | notEquals (Object a, Object b) throws Throwable |
Compare two values for inequality. More... | |
boolean | regexpMatches (String s, String regexp) throws Throwable |
Compare a string for match against a regexp. More... | |
int | main () throws Throwable |
Run the whole suite, report results. | |
Public Member Methods inherited from org.qore.jni.QoreObjectWrapper | |
QoreObjectWrapper (QoreObject obj) | |
creates the wrapper object with the Qore object | |
void | release () |
releases the Qore object; do not call any further methods on the object after this call | |
QoreObject | getQoreObject () |
returns the Qore object | |
String | className () |
returns the class name for the Qore object | |
boolean | instanceOf (String class_name) |
returns true if the object is an instance of the given class | |
Static Public Member Methods | |
static String | getAssertionName (String name) throws Throwable |
returns the assertion name for display purposes | |
static String | getAssertionName () throws Throwable |
returns the assertion name for display purposes | |
Private Member Methods | |
Test (QoreObject obj) throws Throwable | |
creates the object based on the given Qore object | |
Additional Inherited Members | |
Private Attributes inherited from org.qore.jni.QoreObjectWrapper | |
QoreObject | obj |
the wrapper Qore object | |
Base class (wrapping the Qore QUnit::Test class) representing a simple test, implements an implicit main() method and all utility methods for testing.
|
inline |
adds a test case to run
name | the name of the test case |
call | the code to call that executes the test case |
|
inline |
adds a test case to run
name | the name of the test case |
call | the code to call that executes the test case |
args | any optional arguments to the test case call |
|
inline |
Tests a value for equality to an expected value with hard comparisons (types and values must be identical)
expected | the expected value |
actual | the value generated by the test |
name | the name or description of the assertion |
|
inline |
Tests a value for equality to an expected value with hard comparisons (types and values must be identical)
expected | the expected value |
actual | the value generated by the test |
|
inline |
Tests a value for equality to an expected value with soft comparisons (types may differ)
expected | the expected value |
actual | the value generated by the test |
name | the name or description of the assertion |
|
inline |
Tests a value for equality to an expected value with soft comparisons (types may differ)
expected | the expected value |
actual | the value generated by the test |
|
inline |
Tests a boolean value.
actual | the value generated by the test |
name | the name or description of the assertion |
|
inline |
Tests a boolean value.
actual | the value generated by the test |
|
inline |
Tests a float value for equality to an expected value with an allowed error.
expected | the expected value |
actual | the value generated by the test |
epsilon | the allowed error |
name | the name or description of the assertion |
|
inline |
Tests a float value for equality to an expected value with an allowed error.
expected | the expected value |
actual | the value generated by the test |
epsilon | the allowed error |
|
inline |
Tests a float value for equality to an expected value with an allowed error.
expected | the expected value |
actual | the value generated by the test |
|
inline |
Tests that a value is greater than or equal to an expected value with hard comparisons (types may not differ)
expected | a value that should be less than or equal to actual |
actual | the value generated by the test |
name | the name or description of the assertion |
|
inline |
Tests that a value is greater than or equal to an expected value with hard comparisons (types may not differ)
expected | a value that should be less than or equal to actual |
actual | the value generated by the test |
|
inline |
Tests that a value is greater than or equal to than an expected value with soft comparisons (types may differ)
expected | a value that should be less than or equal to actual |
actual | the value generated by the test |
name | the name or description of the assertion |
|
inline |
Tests that a value is greater than or equal to than an expected value with soft comparisons (types may differ)
expected | a value that should be less than or equal to actual |
actual | the value generated by the test |
|
inline |
Tests that a value is greater than an expected value with hard comparisons (types may not differ)
expected | a value that should be less than actual |
actual | the value generated by the test |
name | the name or description of the assertion |
|
inline |
Tests that a value is greater than an expected value with hard comparisons (types may not differ)
expected | a value that should be less than actual |
actual | the value generated by the test |
|
inline |
Tests that a value is greater than an expected value with soft comparisons (types may differ)
expected | a value that should be less than actual |
actual | the value generated by the test |
name | the name or description of the assertion |
|
inline |
Tests that a value is greater than an expected value with soft comparisons (types may differ)
expected | a value that should be less than actual |
actual | the value generated by the test |
|
inline |
Tests that a value is less than or equal to an expected value with hard comparisons (types may not differ)
expected | a value that should be greater than or equal to actual |
actual | the value generated by the test |
name | the name or description of the assertion |
|
inline |
Tests that a value is less than or equal to an expected value with hard comparisons (types may not differ)
expected | a value that should be greater than or equal to actual |
actual | the value generated by the test |
|
inline |
Tests that a value is less than or equal to than an expected value with soft comparisons (types may differ)
expected | a value that should be greater than or equal to actual |
actual | the value generated by the test |
name | the name or description of the assertion |
|
inline |
Tests that a value is less than or equal to than an expected value with soft comparisons (types may differ)
expected | a value that should be greater than or equal to actual |
actual | the value generated by the test |
|
inline |
Tests that a value is less than an expected value with hard comparisons (types may not differ)
expected | a value that should be greater than actual |
actual | the value generated by the test |
name | the name or description of the assertion |
|
inline |
Tests that a value is less than an expected value with hard comparisons (types may not differ)
expected | a value that should be greater than actual |
actual | the value generated by the test |
|
inline |
Tests that a value is less than an expected value with soft comparisons (types may differ)
expected | a value that should be greater than actual |
actual | the value generated by the test |
name | the name or description of the assertion |
|
inline |
Tests that a value is less than an expected value with soft comparisons (types may differ)
expected | a value that should be greater than actual |
actual | the value generated by the test |
|
inline |
Tests a value for inequality to an expected value with hard comparisons (types and values must be identical)
expected | the value that should not be equal to the test value with a hard comparison |
actual | the value generated by the test |
name | the name or description of the assertion |
|
inline |
Tests a value for inequality to an expected value with hard comparisons (types and values must be identical)
expected | the value that should not be equal to the test value with a hard comparison |
actual | the value generated by the test |
|
inline |
Tests a value for inequality to an expected value with soft comparisons (types may differ)
expected | the value that should not be equal to the test value with a soft comparison |
actual | the value generated by the test |
name | the name or description of the assertion |
|
inline |
Tests a value for inequality to an expected value with soft comparisons (types may differ)
expected | the value that should not be equal to the test value with a soft comparison |
actual | the value generated by the test |
|
inline |
Tests for no value.
actual | the value generated by the test |
name | the name or description of the assertion |
|
inline |
Tests for no value.
actual | the value generated by the test |
|
inline |
Tests that a test value does not pass a regular expression match.
regex_pattern | the regular expression pattern string that the test value should not match |
actual | the value generated by the test |
name | the name or description of the assertion |
|
inline |
Tests a number value for equality to an expected value with an allowed error.
expected | the expected value |
actual | the value generated by the test |
epsilon | the allowed error |
name | the name or description of the assertion |
|
inline |
Tests a number value for equality to an expected value with an allowed error.
expected | the expected value |
actual | the value generated by the test |
epsilon | the allowed error |
name | the name or description of the assertion |
|
inline |
Tests a number value for equality to an expected value with an allowed error.
expected | the expected value |
actual | the value generated by the test |
|
inline |
Tests that a test value passes a regular expression match.
regex_pattern | the regular expression pattern string that the test value should match |
actual | the value generated by the test |
name | the name or description of the assertion |
|
inline |
Tests that a test value passes a regular expression match.
regex_pattern | the regular expression pattern string that the test value should match |
actual | the value generated by the test |
name | the name or description of the assertion |
|
inline |
Skips assertion on purpose.
name | the name or description of the assertion |
|
inline |
Tests that a piece of code throws an exception with given description.
expectedErr | the expected exception type |
expectedDesc | the expected exception detail (desc field), ignored if NOTHING |
theCode | the code to execute |
args | optional arguments to the code |
name | an optional label for the assertion |
|
inline |
Tests that a piece of code throws an exception with given description.
expectedErr | the expected exception type |
expectedDesc | the expected exception detail (desc field), ignored if NOTHING |
theCode | the code to execute |
args | optional arguments to the code |
|
inline |
Tests that a piece of code throws an exception with given description.
expectedErr | the expected exception type |
expectedDesc | the expected exception detail (desc field), ignored if NOTHING |
theCode | the code to execute |
|
inline |
Tests that a piece of code throws an exception with given description.
expectedErr | the expected exception type |
theCode | the code to execute |
args | optional arguments to the code |
name | an optional label for the assertion |
|
inline |
Tests that a piece of code throws an exception with given description.
expectedErr | the expected exception type |
theCode | the code to execute |
args | optional arguments to the code |
|
inline |
Tests that a piece of code throws an exception with given description.
expectedErr | the expected exception type |
expectedDesc | the expected exception detail (desc field), ignored if NOTHING |
theCode | the code to execute |
name | an optional label for the assertion |
|
inline |
Tests that a piece of code throws an exception with given description.
expectedErr | the expected exception type |
expectedDesc | the expected exception detail (desc field), ignored if NOTHING |
theCode | the code to execute |
|
inline |
Tests that a piece of code throws an exception with given description.
expectedErr | the expected exception type |
theCode | the code to execute |
name | an optional label for the assertion |
|
inline |
Tests that a piece of code throws an exception with given description.
expectedErr | the expected exception type |
theCode | the code to execute |
|
inline |
Tests a boolean value.
actual | the value generated by the test |
name | the name or description of the assertion |
|
inline |
Tests a boolean value.
actual | the value generated by the test |
|
inline |
Compare two values for equality.
a | Argument 1 |
b | Argument 2 |
|
inline |
Fails the test unconditionally.
msg | the failure message |
|
inline |
Compare two values for inequality.
a | Argument 1 |
b | Argument 2 |
|
inline |
Compare a string for match against a regexp.
s | String to match |
regexp | Regular expression to match against |
|
inline |
Tests for a single assertion for a call returning an integer value and returns the value generated.
name | the name or description of the assertion |
condition | A test function whose result we are asserting |
args | Arguments passed to condition |
expectedResultValue | the expected value |
|
inline |
Tests for a single assertion for a call returning an integer value and returns the value generated.
name | the name or description of the assertion |
condition | A test function whose result we are asserting |
expectedResultValue | the expected value |
|
inline |
Tests for a single assertion and returns the value generated.
name | the name or description of the assertion |
condition | A test function whose result we are asserting |
args | Arguments passed to condition |
expectedResult | A class describing the expected result of condition; the default is QUnit::TestResultSuccess |
|
inline |
Tests for a single assertion and returns the value generated.
name | the name or description of the assertion |
condition | A test function whose result we are asserting |
args | Arguments passed to condition |
|
inline |
Tests for a single assertion and returns the value generated.
name | the name or description of the assertion |
condition | A test function whose result we are asserting |
expectedResult | A class describing the expected result of condition; the default is QUnit::TestResultSuccess |
|
inline |
Tests for a single assertion and returns the value generated.
name | the name or description of the assertion |
condition | A test function whose result we are asserting |
|
inline |
Tests a value for equality to an expected value.
name | the name or description of the assertion |
actual | the value generated by the test |
expected | the expected value |
|
inline |
Tests a value for equality to an expected value of number type.
name | the name or description of the assertion |
actual | the value generated by the test |
expected | the expected value |
epsilon | accepted difference |
|
inline |
Tests a value for equality to an expected value of number type.
name | the name or description of the assertion |
actual | the value generated by the test |
expected | the expected value |
|
inline |
Tests a value for equality to an expected value of float type.
name | the name or description of the assertion |
actual | the value generated by the test |
expected | the expected value |
epsilon | accepted difference |
|
inline |
Tests a value for equality to an expected value of float type.
name | the name or description of the assertion |
actual | the value generated by the test |
expected | the expected value |
epsilon | accepted difference |
|
inline |
Tests for a single assertion for a call returning no value (for example, to ensure that the call does not throw an exception)
name | the name or description of the assertion |
condition | A test function whose result we are asserting |
args | Arguments passed to condition |
|
inline |
Tests for a single assertion for a call returning no value (for example, to ensure that the call does not throw an exception)
name | the name or description of the assertion |
condition | A test function whose result we are asserting |
|
inline |
Skips a given test, eg. because it may be missing some dependencies.
reason | The reason for the test skip; used as the format argument with vsprintf() with any remaining arguments |
|
inline |
Skips a given test, eg. because it may be missing some dependencies.
reason | The reason for the test skip |