[llvm] r186372 - Rename Support.TimeValue to TimeValue.time_t in unittests/Support.
NAKAMURA Takumi
geek4civic at gmail.com
Mon Jul 15 19:03:32 PDT 2013
Author: chapuni
Date: Mon Jul 15 21:03:32 2013
New Revision: 186372
URL: http://llvm.org/viewvc/llvm-project?rev=186372&view=rev
Log:
Rename Support.TimeValue to TimeValue.time_t in unittests/Support.
Added:
llvm/trunk/unittests/Support/TimeValueTest.cpp
- copied, changed from r186371, llvm/trunk/unittests/Support/TimeValue.cpp
Removed:
llvm/trunk/unittests/Support/TimeValue.cpp
Modified:
llvm/trunk/unittests/Support/CMakeLists.txt
Modified: llvm/trunk/unittests/Support/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/CMakeLists.txt?rev=186372&r1=186371&r2=186372&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/CMakeLists.txt (original)
+++ llvm/trunk/unittests/Support/CMakeLists.txt Mon Jul 15 21:03:32 2013
@@ -28,7 +28,7 @@ add_llvm_unittest(SupportTests
ProgramTest.cpp
RegexTest.cpp
SwapByteOrderTest.cpp
- TimeValue.cpp
+ TimeValueTest.cpp
ValueHandleTest.cpp
YAMLIOTest.cpp
YAMLParserTest.cpp
Removed: llvm/trunk/unittests/Support/TimeValue.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/TimeValue.cpp?rev=186371&view=auto
==============================================================================
--- llvm/trunk/unittests/Support/TimeValue.cpp (original)
+++ llvm/trunk/unittests/Support/TimeValue.cpp (removed)
@@ -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);
-}
-
-}
Copied: llvm/trunk/unittests/Support/TimeValueTest.cpp (from r186371, llvm/trunk/unittests/Support/TimeValue.cpp)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/TimeValueTest.cpp?p2=llvm/trunk/unittests/Support/TimeValueTest.cpp&p1=llvm/trunk/unittests/Support/TimeValue.cpp&r1=186371&r2=186372&rev=186372&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/TimeValue.cpp (original)
+++ llvm/trunk/unittests/Support/TimeValueTest.cpp Mon Jul 15 21:03:32 2013
@@ -1,4 +1,4 @@
-//===- llvm/unittest/Support/TimeValue.cpp - Time Value tests -------------===//
+//===- llvm/unittest/Support/TimeValueTest.cpp - Time Value tests ---------===//
//
// The LLVM Compiler Infrastructure
//
@@ -14,7 +14,7 @@
using namespace llvm;
namespace {
-TEST(Support, TimeValue) {
+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);
More information about the llvm-commits
mailing list