diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-07-16 02:03:32 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-07-16 02:03:32 +0000 |
commit | ad187dd20e2d3d37fb6dcece53581b99a1e345cc (patch) | |
tree | 588de9a9ce6a3e423843a2fe8a5b1346323d3f97 /llvm/unittests/Support/TimeValueTest.cpp | |
parent | d3a34f81f87d5707c2f61d8e771c97d3678b5be4 (diff) | |
download | bcm5719-llvm-ad187dd20e2d3d37fb6dcece53581b99a1e345cc.tar.gz bcm5719-llvm-ad187dd20e2d3d37fb6dcece53581b99a1e345cc.zip |
Rename Support.TimeValue to TimeValue.time_t in unittests/Support.
llvm-svn: 186372
Diffstat (limited to 'llvm/unittests/Support/TimeValueTest.cpp')
-rw-r--r-- | llvm/unittests/Support/TimeValueTest.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/unittests/Support/TimeValueTest.cpp b/llvm/unittests/Support/TimeValueTest.cpp new file mode 100644 index 00000000000..0fd56750151 --- /dev/null +++ b/llvm/unittests/Support/TimeValueTest.cpp @@ -0,0 +1,23 @@ +//===- llvm/unittest/Support/TimeValueTest.cpp - Time Value tests ---------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "gtest/gtest.h" +#include "llvm/Support/TimeValue.h" +#include <time.h> + +using namespace llvm; +namespace { + +TEST(TimeValue, time_t) { + sys::TimeValue now = sys::TimeValue::now(); + time_t now_t = time(NULL); + EXPECT_TRUE(abs(static_cast<long>(now_t - now.toEpochTime())) < 2); +} + +} |