Rename Support.TimeValue to TimeValue.time_t in unittests/Support.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Tue, 16 Jul 2013 02:03:32 +0000 (02:03 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Tue, 16 Jul 2013 02:03:32 +0000 (02:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186372 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Support/CMakeLists.txt
unittests/Support/TimeValue.cpp [deleted file]
unittests/Support/TimeValueTest.cpp [new file with mode: 0644]

index b66c5db2c3e5b49ab6484caa02b82cb00502d18f..fedfb3d22548c4fc83de118c6f4f83a118d5923b 100644 (file)
@@ -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 (file)
index 27883ae..0000000
+++ /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 <time.h>
-
-using namespace llvm;
-namespace {
-
-TEST(Support, TimeValue) {
-  sys::TimeValue now = sys::TimeValue::now();
-  time_t now_t = time(NULL);
-  EXPECT_TRUE(abs(static_cast<long>(now_t - now.toEpochTime())) < 2);
-}
-
-}
diff --git a/unittests/Support/TimeValueTest.cpp b/unittests/Support/TimeValueTest.cpp
new file mode 100644 (file)
index 0000000..0fd5675
--- /dev/null
@@ -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);
+}
+
+}