Commit r331416 breaks the big-endian PPC bot. On the big endian build, we
[llvm-core.git] / unittests / Support / Threading.cpp
blobbe53026415d7f2818f9a4515b7d3432fddcaefc7
1 //===- unittests/Threading.cpp - Thread tests -----------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
10 #include "llvm/Support/Threading.h"
11 #include "llvm/Support/thread.h"
12 #include "gtest/gtest.h"
14 using namespace llvm;
16 namespace {
18 TEST(Threading, PhysicalConcurrency) {
19 auto Num = heavyweight_hardware_concurrency();
20 // Since Num is unsigned this will also catch us trying to
21 // return -1.
22 ASSERT_LE(Num, thread::hardware_concurrency());
25 } // end anon namespace