/*
This launcher will be used to run the test files and catch the halts.
You can specify a different directory name using the `--dir`
You can set whether or not to descend recursively into
subdirectories (defaults to true) using `--subdir`
*/
use FileSystem;
use Spawn;
use Path;
/*
Holder for test result information.
Test results are automatically managed by the TestRunner, and do not
need to be explicitly manipulated by writers of tests.
Each instance holds the total number of tests run, and collections of
failures and errors that occurred among those test runs. The collections
contain tuples of (testcase, exceptioninfo), where exceptioninfo is the
formatted traceback of the error that occurred.
*/
module UnitTest {
use Reflection;
use TestError;
config const skipId: int = 0;
// This is a dummy test so that we get capture the function signature
private
proc testSignature(test: Test) throws { }
var tempFcf = testSignature;
module UnitTest {
use Reflection;
/*
Assert that a boolean condition is true. If it is false, prints
'assert failed' and halts the program.
:arg test: the boolean condition
:type test: `bool`
*/
Issue #13068
I believe it will be very useful if, especially for the unit test framework if it were possible to get the name of method present in a class as a string. This will be helpful to check if the method is a test method or not.
/* Get the type of the ith method in a class.
Causes a compilation error if `i` is not in 1..numMethods(t).
:arg t: a class type
:arg i: which method to get the name of
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Inheritance in Java is a mechanism in which one object acquires all the properties and behaviors of a parent object. When you inherit from an existing class, you can reuse methods and fields of the parent class. Moreover, you can add new methods and fields in your current class also.
- For Method Overriding (so runtime polymorphism can be achieved).
- For Code Reusability.
NewerOlder