From 3c178512002c87077dcc49ddbdd29c4527e808d7 Mon Sep 17 00:00:00 2001 From: sh0f <30991096+sh0f@users.noreply.github.com> Date: Wed, 1 Jan 2020 15:00:23 +0800 Subject: [PATCH] time: add test for #3291 --- vlib/time/time_test.v | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vlib/time/time_test.v b/vlib/time/time_test.v index 7d71174237..d95422764a 100644 --- a/vlib/time/time_test.v +++ b/vlib/time/time_test.v @@ -89,6 +89,14 @@ fn test_unix() { assert t5.hour == 5 assert t5.minute == 6 assert t5.second == 7 + + t6 := time.unix(1577858969) + assert t6.year == 2020 + assert t6.month == 1 + assert t6.day == 1 + assert t6.hour == 6 + assert t6.minute == 9 + assert t6.second == 29 } fn test_unix2() {