java.lang.Object | ||
↳ | TestCase | |
↳ | org.joda.time.chrono.gj.MainTest |
Tests either the Julian or Gregorian chronology from org.joda.time.chrono.gj against the implementations in this package. It tests all the date fields against their principal methods.
Randomly generated values are fed into the DateTimeField methods and the results are compared between the two chronologies. If any result doesn't match, an error report is generated and the program exits. Each time this test program is run, the pseudo random number generator is seeded with the same value. This ensures consistent results between test runs.
The main method accepts three optional arguments: iterations, mode, seed. By default, iterations is set to 1,000,000. The test will take several minutes to run, depending on the computer's performance. Every 5 seconds a progress message is printed.
The mode can be either 'g' for proleptic gregorian (the default) or 'j' for proleptic julian. To override the default random number generator seed, pass in a third argument which accepts a long signed integer.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | GREGORIAN_MODE | ||||||||||
int | JULIAN_MODE |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Arguments: iterations [mode [seed]]
| |||||||||||
Main junit test
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
iterations | number of test iterations to perform |
---|---|
mode | GREGORIAN_MODE or JULIAN_MODE,0=Gregorian, 1=Julian |
seed | seed for random number generator |
Main junit test