mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
x64, v2 backends
This commit is contained in:
@ -21,6 +21,17 @@ fn test_is_leap_year() {
|
||||
assert time.is_leap_year(2100) == false
|
||||
}
|
||||
|
||||
fn test_now_format() {
|
||||
/*
|
||||
t := time.now()
|
||||
u:=t.uni
|
||||
println(u)
|
||||
println(t.format())
|
||||
println(time.unix(u).format())
|
||||
assert t.format() == time.unix(u).format()
|
||||
*/
|
||||
}
|
||||
|
||||
fn check_days_in_month(month, year, expected int) bool {
|
||||
res := time.days_in_month(month, year) or {
|
||||
return false
|
||||
@ -80,6 +91,18 @@ fn test_unix() {
|
||||
assert t5.second == 7
|
||||
}
|
||||
|
||||
fn test_unix2() {
|
||||
/*
|
||||
println(t.year)
|
||||
assert t.year == 2019
|
||||
assert t.month == 12
|
||||
assert t.day == 31
|
||||
assert t.hour == 8
|
||||
assert t.minute == 9
|
||||
assert t.second == 53
|
||||
*/
|
||||
}
|
||||
|
||||
fn test_format_ss() {
|
||||
assert '11.07.1980 21:23:42' == time_to_test.get_fmt_str(.dot, .hhmmss24, .ddmmyyyy)
|
||||
}
|
||||
|
Reference in New Issue
Block a user