mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
unittests: Merge SystemTests back into SupportTests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120330 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
23
unittests/Support/TimeValue.cpp
Normal file
23
unittests/Support/TimeValue.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
//===- 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);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user