test: add all missing method tests

This commit is contained in:
Nurul Huda (Apon) 2026-02-11 17:08:20 +06:00
parent cb57f3e0a2
commit e831cd7054
8 changed files with 440 additions and 0 deletions

View file

@ -604,3 +604,55 @@ test total {
try std.testing.expectError(error.RangeError, dur.total(.{ .unit = .day })); try std.testing.expectError(error.RangeError, dur.total(.{ .unit = .day }));
} }
} }
test years {
if (true) return error.Todo;
}
test months {
if (true) return error.Todo;
}
test weeks {
if (true) return error.Todo;
}
test days {
if (true) return error.Todo;
}
test hours {
if (true) return error.Todo;
}
test minutes {
if (true) return error.Todo;
}
test seconds {
if (true) return error.Todo;
}
test milliseconds {
if (true) return error.Todo;
}
test microseconds {
if (true) return error.Todo;
}
test nanoseconds {
if (true) return error.Todo;
}
test sign {
if (true) return error.Todo;
}
test toJSON {
if (true) return error.Todo;
}
test toLocaleString {
if (true) return error.Todo;
}

View file

@ -487,3 +487,27 @@ test toLocaleString {
// Auto precision should include fractional seconds // Auto precision should include fractional seconds
try std.testing.expect(std.mem.containsAtLeast(u8, locale_str2, 1, "2024-01-01T00:00:00")); try std.testing.expect(std.mem.containsAtLeast(u8, locale_str2, 1, "2024-01-01T00:00:00"));
} }
test fromEpochMilliseconds {
if (true) return error.Todo;
}
test add {
if (true) return error.Todo;
}
test toJSON {
if (true) return error.Todo;
}
test toZonedDateTimeISO {
if (true) return error.Todo;
}
test epochMilliseconds {
if (true) return error.Todo;
}
test epochNanoseconds {
if (true) return error.Todo;
}

View file

@ -534,3 +534,75 @@ test withCalendar {
try std.testing.expectEqual(@as(i32, 2024), result.year()); try std.testing.expectEqual(@as(i32, 2024), result.year());
} }
test calInit {
if (true) return error.Todo;
}
test valueOf {
if (true) return error.Todo;
}
test day {
if (true) return error.Todo;
}
test dayOfWeek {
if (true) return error.Todo;
}
test dayOfYear {
if (true) return error.Todo;
}
test daysInMonth {
if (true) return error.Todo;
}
test daysInWeek {
if (true) return error.Todo;
}
test daysInYear {
if (true) return error.Todo;
}
test monthCode {
if (true) return error.Todo;
}
test month {
if (true) return error.Todo;
}
test monthsInYear {
if (true) return error.Todo;
}
test year {
if (true) return error.Todo;
}
test inLeapYear {
if (true) return error.Todo;
}
test calendarId {
if (true) return error.Todo;
}
test era {
if (true) return error.Todo;
}
test eraYear {
if (true) return error.Todo;
}
test weekOfYear {
if (true) return error.Todo;
}
test yearOfWeek {
if (true) return error.Todo;
}

View file

@ -704,3 +704,99 @@ test withPlainTime {
try std.testing.expectEqual(@as(u8, 15), result.minute()); try std.testing.expectEqual(@as(u8, 15), result.minute());
try std.testing.expectEqual(@as(u8, 30), result.second()); try std.testing.expectEqual(@as(u8, 30), result.second());
} }
test calInit {
if (true) return error.Todo;
}
test calendarId {
if (true) return error.Todo;
}
test day {
if (true) return error.Todo;
}
test dayOfWeek {
if (true) return error.Todo;
}
test dayOfYear {
if (true) return error.Todo;
}
test daysInMonth {
if (true) return error.Todo;
}
test daysInWeek {
if (true) return error.Todo;
}
test daysInYear {
if (true) return error.Todo;
}
test month {
if (true) return error.Todo;
}
test monthCode {
if (true) return error.Todo;
}
test monthsInYear {
if (true) return error.Todo;
}
test year {
if (true) return error.Todo;
}
test inLeapYear {
if (true) return error.Todo;
}
test era {
if (true) return error.Todo;
}
test eraYear {
if (true) return error.Todo;
}
test weekOfYear {
if (true) return error.Todo;
}
test yearOfWeek {
if (true) return error.Todo;
}
test hour {
if (true) return error.Todo;
}
test minute {
if (true) return error.Todo;
}
test second {
if (true) return error.Todo;
}
test millisecond {
if (true) return error.Todo;
}
test microsecond {
if (true) return error.Todo;
}
test nanosecond {
if (true) return error.Todo;
}
test valueOf {
if (true) return error.Todo;
}

View file

@ -284,3 +284,19 @@ test toLocaleString {
try std.testing.expect(str.len > 0); try std.testing.expect(str.len > 0);
try std.testing.expect(std.mem.indexOf(u8, str, "12") != null or std.mem.indexOf(u8, str, "25") != null); try std.testing.expect(std.mem.indexOf(u8, str, "12") != null or std.mem.indexOf(u8, str, "25") != null);
} }
test calendarId {
if (true) return error.Todo;
}
test day {
if (true) return error.Todo;
}
test monthCode {
if (true) return error.Todo;
}
test valueOf {
if (true) return error.Todo;
}

View file

@ -401,3 +401,35 @@ test until {
try std.testing.expectEqual(@as(i64, 1), dur.hours()); try std.testing.expectEqual(@as(i64, 1), dur.hours());
try std.testing.expectEqual(@as(i64, 30), dur.minutes()); try std.testing.expectEqual(@as(i64, 30), dur.minutes());
} }
test hour {
if (true) return error.Todo;
}
test minute {
if (true) return error.Todo;
}
test second {
if (true) return error.Todo;
}
test millisecond {
if (true) return error.Todo;
}
test microsecond {
if (true) return error.Todo;
}
test nanosecond {
if (true) return error.Todo;
}
test toLocaleString {
if (true) return error.Todo;
}
test valueOf {
if (true) return error.Todo;
}

View file

@ -491,3 +491,7 @@ test "props" {
try std.testing.expect(false); try std.testing.expect(false);
} }
} }
test valueOf {
if (true) return error.Todo;
}

View file

@ -636,3 +636,147 @@ test "props" {
defer std.testing.allocator.free(tzo); defer std.testing.allocator.free(tzo);
try std.testing.expectEqualStrings("UTC", tzo); try std.testing.expectEqualStrings("UTC", tzo);
} }
test fromEpochNanoseconds {
if (true) return error.Todo;
}
test add {
if (true) return error.Todo;
}
test getTimeZoneTransition {
if (true) return error.Todo;
}
test round {
if (true) return error.Todo;
}
test since {
if (true) return error.Todo;
}
test startOfDay {
if (true) return error.Todo;
}
test subtract {
if (true) return error.Todo;
}
test toJSON {
if (true) return error.Todo;
}
test toLocaleString {
if (true) return error.Todo;
}
test until {
if (true) return error.Todo;
}
test valueOf {
if (true) return error.Todo;
}
test with {
if (true) return error.Todo;
}
test withCalendar {
if (true) return error.Todo;
}
test withPlainTime {
if (true) return error.Todo;
}
test withTimeZone {
if (true) return error.Todo;
}
test calendarId {
if (true) return error.Todo;
}
test dayOfWeek {
if (true) return error.Todo;
}
test dayOfYear {
if (true) return error.Todo;
}
test daysInMonth {
if (true) return error.Todo;
}
test daysInWeek {
if (true) return error.Todo;
}
test daysInYear {
if (true) return error.Todo;
}
test epochMilliseconds {
if (true) return error.Todo;
}
test epochNanoseconds {
if (true) return error.Todo;
}
test era {
if (true) return error.Todo;
}
test eraYear {
if (true) return error.Todo;
}
test hoursInDay {
if (true) return error.Todo;
}
test inLeapYear {
if (true) return error.Todo;
}
test microsecond {
if (true) return error.Todo;
}
test monthCode {
if (true) return error.Todo;
}
test monthsInYear {
if (true) return error.Todo;
}
test nanosecond {
if (true) return error.Todo;
}
test offset {
if (true) return error.Todo;
}
test offsetNanoseconds {
if (true) return error.Todo;
}
test weekOfYear {
if (true) return error.Todo;
}
test yearOfWeek {
if (true) return error.Todo;
}
test clone {
if (true) return error.Todo;
}