The Unittest library is used to compile unit test code for the Cangjie project. It provides basic functions including code writing, running, and debugging, and some advanced functions for experienced users. The Cangjie unit test supports the CJC compiler (single-package compilation mode) and CJPM package manager (multi-package mode).
Specifies an object for storing the unittest configuration data generated by the @Configure macro. Configuration is a class similar to HashMap, but its key is not of a key or value type but of a String type and its value is of any given type.
Generates random data of type T. T must implement the Arbitrary<T> interface. The returned value of this function is a parameter source for parameterized tests.
Specifies an interface used to handle performance testing. It requires executing specific code before each invocation of the performance test. When the input for the performance test changes, the input data must be regenerated from scratch each time.
Specifies an interface for collecting and analyzing various types of data during the performance test. The specific instance of Measurement used during the performance test is specified in the @Measure macro (for example, in the class declaration).
Specifies the simplest input provider that merely copies data for each benchmark call. It is applicable to the scenario where the benchmark test does not change the input. This is the default provider used within the framework.