1
0
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:
Alexander Medvednikov
2019-12-31 19:42:16 +01:00
parent 222f2f08f6
commit 4d31d5882d
21 changed files with 901 additions and 74 deletions

View File

@ -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)
}