123456789101112131415161718192021222324252627 |
- void main() {
- long l1 = getMillis();
- long l2 = getMillis();
- long l3 = getMillis();
- long l4 = getMillis();
- test(l1 <= l2 && l2 <= l3 && l3 <= l4);
-
- l1 = getNanos();
- l2 = getNanos();
- l3 = getNanos();
- l4 = getNanos();
- test(l1 < l2 && l2 < l3 && l3 < l4);
-
- Time time;
- long millis = getMillis();
- toTime(&time, millis);
-
- test(time.year >= 2021);
- test(time.month >= 0 && time.month <= 11);
- test(time.day >= 1 && time.day <= 31);
- test(time.hours >= 0 && time.hours <= 59);
- test(time.minutes >= 0 && time.minutes <= 59);
- test(time.seconds >= 0 && time.seconds <= 60);
- test(time.millis >= 0 && time.millis <= 999);
-
- test(millis == toMillis(&time));
- }
|