summaryrefslogtreecommitdiff
path: root/test/std/utilities/time/time.clock/time.clock.system/now.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/utilities/time/time.clock/time.clock.system/now.pass.cpp')
-rw-r--r--test/std/utilities/time/time.clock/time.clock.system/now.pass.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/std/utilities/time/time.clock/time.clock.system/now.pass.cpp b/test/std/utilities/time/time.clock/time.clock.system/now.pass.cpp
new file mode 100644
index 0000000000000..ebc0db80b6484
--- /dev/null
+++ b/test/std/utilities/time/time.clock/time.clock.system/now.pass.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <chrono>
+
+// system_clock
+
+// static time_point now();
+
+#include <chrono>
+#include <cassert>
+
+int main()
+{
+ typedef std::chrono::system_clock C;
+ C::time_point t1 = C::now();
+ assert(t1.time_since_epoch().count() != 0);
+ assert(C::time_point::min() < t1);
+ assert(C::time_point::max() > t1);
+}