![]() |
Qore jni Module 2.4.0
|
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 | |
| void | addTestCase (String name, TestCodeArgs call, Object... args) throws Throwable |
| adds a test case to run | |
| Object | testAssertionValue (String name, Object actual, Object expected) throws Throwable |
| Tests a value for equality to an expected value. | |
| Object | testAssertionValue (String name, BigDecimal actual, BigDecimal expected, BigDecimal epsilon) throws Throwable |
| Tests a value for equality to an expected value of number type. | |
| Object | testAssertionValue (String name, BigDecimal actual, BigDecimal expected) throws Throwable |
| Tests a value for equality to an expected value of number type. | |
| Object | testAssertionValue (String name, float actual, float expected, float epsilon) throws Throwable |
| Tests a value for equality to an expected value of float type. | |
| Object | testAssertionValue (String name, float actual, float expected) throws Throwable |
| Tests a value for equality to an expected value of float type. | |
| void | assertRegex (String regex_pattern, String actual, String name) throws Throwable |
| Tests that a test value passes a regular expression match. | |
| void | assertRegex (String regex_pattern, String actual) throws Throwable |
| Tests that a test value passes a regular expression match. | |
| void | assertNRegex (String regex_pattern, String actual, String name) throws Throwable |
| Tests that a test value does not pass a regular expression match. | |
| void | assertNothing (Object actual, String name) throws Throwable |
| Tests for no value. | |
| void | assertNothing (Object actual) throws Throwable |
| Tests for no value. | |
| 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). | |
| void | assertEqSoft (Object expected, Object actual) throws Throwable |
| Tests a value for equality to an expected value with soft comparisons (types may differ). | |
| 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). | |
| void | assertNeqSoft (Object expected, Object actual) throws Throwable |
| Tests a value for inequality to an expected value with soft comparisons (types may differ). | |
| 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). | |
| 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). | |
| 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). | |
| 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). | |
| 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. | |
| void | assertFloatEq (float expected, float actual, float epsilon) throws Throwable |
| Tests a float value for equality to an expected value with an allowed error. | |
| void | assertFloatEq (float expected, float actual) throws Throwable |
| Tests a float value for equality to an expected value with an allowed error. | |
| 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. | |
| void | assertNumberEq (BigDecimal expected, BigDecimal actual, BigDecimal epsilon) throws Throwable |
| Tests a number value for equality to an expected value with an allowed error. | |
| void | assertNumberEq (BigDecimal expected, BigDecimal actual) throws Throwable |
| Tests a number value for equality to an expected value with an allowed error. | |
| 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). | |
| void | assertGtSoft (Object expected, Object actual) throws Throwable |
| Tests that a value is greater than an expected value with soft comparisons (types may differ). | |
| 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). | |
| 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). | |
| 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). | |
| 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). | |
| 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). | |
| 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). | |
| 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). | |
| void | assertLtSoft (Object expected, Object actual) throws Throwable |
| Tests that a value is less than an expected value with soft comparisons (types may differ). | |
| 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). | |
| 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). | |
| 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). | |
| 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). | |
| 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). | |
| 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). | |
| void | assertTrue (Object actual, String name) throws Throwable |
| Tests a boolean value. | |
| void | assertTrue (Object actual) throws Throwable |
| Tests a boolean value. | |
| void | assertFalse (Object actual, String name) throws Throwable |
| Tests a boolean value. | |
| void | assertFalse (Object actual) throws Throwable |
| Tests a boolean value. | |
| 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. | |
| void | assertThrows (String expectedErr, String expectedDesc, TestCodeArgs theCode, Object[] args) throws Throwable |
| Tests that a piece of code throws an exception with given description. | |
| void | assertThrows (String expectedErr, String expectedDesc, TestCodeArgs theCode) throws Throwable |
| Tests that a piece of code throws an exception with given description. | |
| void | assertThrows (String expectedErr, TestCodeArgs theCode, Object[] args, String name) throws Throwable |
| Tests that a piece of code throws an exception with given description. | |
| void | assertThrows (String expectedErr, TestCodeArgs theCode, Object[] args) throws Throwable |
| Tests that a piece of code throws an exception with given description. | |
| void | assertThrows (String expectedErr, String expectedDesc, TestCode theCode, String name) throws Throwable |
| Tests that a piece of code throws an exception with given description. | |
| void | assertThrows (String expectedErr, String expectedDesc, TestCode theCode) throws Throwable |
| Tests that a piece of code throws an exception with given description. | |
| void | assertThrows (String expectedErr, TestCode theCode, String name) throws Throwable |
| Tests that a piece of code throws an exception with given description. | |
| void | assertThrows (String expectedErr, TestCode theCode) throws Throwable |
| Tests that a piece of code throws an exception with given description. | |
| void | assertSkip (String name) throws Throwable |
| Skips assertion on purpose. | |
| void | fail (String msg) throws Throwable |
| Fails the test unconditionally. | |
| 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). | |
| 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. | |
| 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). | |
| 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. | |
| Object | testAssertion (String name, TestConditionArgs condition, Object[] args, AbstractTestResult expectedResult) throws Throwable |
| Tests for a single assertion and returns the value generated. | |
| Object | testAssertion (String name, TestConditionArgs condition, Object[] args) throws Throwable |
| Tests for a single assertion and returns the value generated. | |
| Object | testAssertion (String name, TestCondition condition, AbstractTestResult expectedResult) throws Throwable |
| Tests for a single assertion and returns the value generated. | |
| Object | testAssertion (String name, TestCondition condition) throws Throwable |
| Tests for a single assertion and returns the value generated. | |
| void | testSkip (String reason, Object... args) throws Throwable |
| Skips a given test, eg. because it may be missing some dependencies. | |
| void | testSkip (String reason) throws Throwable |
| Skips a given test, eg. because it may be missing some dependencies. | |
| boolean | equals (Object a, Object b) throws Throwable |
| Compare two values for equality. | |
| boolean | notEquals (Object a, Object b) throws Throwable |
| Compare two values for inequality. | |
| boolean | regexpMatches (String s, String regexp) throws Throwable |
| Compare a string for match against a regexp. | |
| 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 | |
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 |
|
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 soft comparisons (types may differ).
| 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 boolean 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 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 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 |
| epsilon | the allowed error |
| 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 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 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 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 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 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 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 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 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 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 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 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 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 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 soft comparisons (types may 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 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 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 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 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 for no value.
| 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 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 |
|
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 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 |
|
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 |
| 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 |
| 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 |
|
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 |
| args | optional arguments to the code |
|
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 a boolean 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 |
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 and returns the value generated.
| name | the name or description of the assertion |
| condition | A test function whose result we are asserting |
|
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 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 |
|
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 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 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 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 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 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 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 |
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 |
Skips a given test, eg. because it may be missing some dependencies.
| reason | The reason for the test skip |
|
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 |