From 5ca98fd98791947eba83a1ed3f2c8191ef7afa6c Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 24 Nov 2014 09:08:18 +0000 Subject: Vendor import of llvm RELEASE_350/final tag r216957 (effectively, 3.5.0 release): https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_350/final@216957 --- unittests/Support/ProcessTest.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'unittests/Support/ProcessTest.cpp') diff --git a/unittests/Support/ProcessTest.cpp b/unittests/Support/ProcessTest.cpp index 27c2318215d6..f4060720961b 100644 --- a/unittests/Support/ProcessTest.cpp +++ b/unittests/Support/ProcessTest.cpp @@ -11,7 +11,7 @@ #include "gtest/gtest.h" #ifdef LLVM_ON_WIN32 -#include "windows.h" +#include #endif namespace { @@ -39,6 +39,13 @@ TEST(ProcessTest, SelfProcess) { EXPECT_GT(TimeValue::MaxTime, process::get_self()->get_wall_time()); } +TEST(ProcessTest, GetRandomNumberTest) { + const unsigned r1 = Process::GetRandomNumber(); + const unsigned r2 = Process::GetRandomNumber(); + // It should be extremely unlikely that both r1 and r2 are 0. + EXPECT_NE((r1 | r2), 0u); +} + #ifdef _MSC_VER #define setenv(name, var, ignore) _putenv_s(name, var) #endif -- cgit v1.2.3