1 //===- llvm/unittest/Support/System.cpp - System tests --===//
2 #include "gtest/gtest.h"
3 #include "llvm/System/TimeValue.h"
8 class SystemTest
: public ::testing::Test
{
11 TEST_F(SystemTest
, TimeValue
) {
12 sys::TimeValue now
= sys::TimeValue::now();
13 time_t now_t
= time(NULL
);
14 EXPECT_TRUE(abs(static_cast<long>(now_t
- now
.toEpochTime())) < 2);