unittests: Add SystemTests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120101 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/System/Makefile b/unittests/System/Makefile
new file mode 100644
index 0000000..336ac30
--- /dev/null
+++ b/unittests/System/Makefile
@@ -0,0 +1,15 @@
+##===- unittests/System/Makefile ---------------------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LEVEL = ../..
+TESTNAME = System
+LINK_COMPONENTS := system
+
+include $(LEVEL)/Makefile.config
+include $(LLVM_SRC_ROOT)/unittests/Makefile.unittest
diff --git a/unittests/System/Path.cpp b/unittests/System/Path.cpp
new file mode 100644
index 0000000..85fbb61
--- /dev/null
+++ b/unittests/System/Path.cpp
@@ -0,0 +1,18 @@
+//===- llvm/unittest/System/Path.cpp - Path 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"
+
+namespace {
+
+TEST(System, Path) {
+  // TODO: Add tests!
+}
+
+} // anonymous namespace
diff --git a/unittests/System/TimeValue.cpp b/unittests/System/TimeValue.cpp
new file mode 100644
index 0000000..d1da5c1
--- /dev/null
+++ b/unittests/System/TimeValue.cpp
@@ -0,0 +1,23 @@
+//===- llvm/unittest/System/TimeValue.cpp - Time Vlaue 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/System/TimeValue.h"
+#include <time.h>
+
+using namespace llvm;
+namespace {
+
+TEST(System, TimeValue) {
+  sys::TimeValue now = sys::TimeValue::now();
+  time_t now_t = time(NULL);
+  EXPECT_TRUE(abs(static_cast<long>(now_t - now.toEpochTime())) < 2);
+}
+
+}