mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Get more Python tests passing (#141)
This commit is contained in:
parent
916f19eea1
commit
59e1c245d1
141 changed files with 3536 additions and 1203 deletions
|
@ -26,7 +26,16 @@ TEST(TimeValToFileTime, roundTrip) {
|
|||
struct timeval tv1, tv2;
|
||||
tv1.tv_sec = 31337;
|
||||
tv1.tv_usec = 1337;
|
||||
FileTimeToTimeVal(&tv2, TimeValToFileTime(&tv1));
|
||||
tv2 = FileTimeToTimeVal(TimeValToFileTime(tv1));
|
||||
EXPECT_EQ(31337, tv2.tv_sec);
|
||||
EXPECT_EQ(1337, tv2.tv_usec);
|
||||
}
|
||||
|
||||
TEST(TimeSpecToFileTime, roundTrip_withSomeTruncation) {
|
||||
struct timespec tv1, tv2;
|
||||
tv1.tv_sec = 31337;
|
||||
tv1.tv_nsec = 1337;
|
||||
tv2 = FileTimeToTimeSpec(TimeSpecToFileTime(tv1));
|
||||
EXPECT_EQ(31337, tv2.tv_sec);
|
||||
EXPECT_EQ(1300, tv2.tv_nsec);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue