From: NAKAMURA Takumi Date: Tue, 16 Jul 2013 02:03:32 +0000 (+0000) Subject: Rename Support.TimeValue to TimeValue.time_t in unittests/Support. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=e7f0393f6d080f599f225dcdc440142e758ffe1b;p=oota-llvm.git Rename Support.TimeValue to TimeValue.time_t in unittests/Support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186372 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/unittests/Support/CMakeLists.txt b/unittests/Support/CMakeLists.txt index b66c5db2c3e..fedfb3d2254 100644 --- a/unittests/Support/CMakeLists.txt +++ b/unittests/Support/CMakeLists.txt @@ -28,7 +28,7 @@ add_llvm_unittest(SupportTests ProgramTest.cpp RegexTest.cpp SwapByteOrderTest.cpp - TimeValue.cpp + TimeValueTest.cpp ValueHandleTest.cpp YAMLIOTest.cpp YAMLParserTest.cpp diff --git a/unittests/Support/TimeValue.cpp b/unittests/Support/TimeValue.cpp deleted file mode 100644 index 27883ae3356..00000000000 --- a/unittests/Support/TimeValue.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//===- llvm/unittest/Support/TimeValue.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 - -using namespace llvm; -namespace { - -TEST(Support, TimeValue) { - sys::TimeValue now = sys::TimeValue::now(); - time_t now_t = time(NULL); - EXPECT_TRUE(abs(static_cast(now_t - now.toEpochTime())) < 2); -} - -} diff --git a/unittests/Support/TimeValueTest.cpp b/unittests/Support/TimeValueTest.cpp new file mode 100644 index 00000000000..0fd56750151 --- /dev/null +++ b/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 + +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(now_t - now.toEpochTime())) < 2); +} + +}