1 //===- unittests/Threading.cpp - Thread tests -----------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #include "llvm/Support/Threading.h"
10 #include "llvm/Support/thread.h"
11 #include "gtest/gtest.h"
17 TEST(Threading
, PhysicalConcurrency
) {
18 auto Num
= heavyweight_hardware_concurrency();
19 // Since Num is unsigned this will also catch us trying to
21 ASSERT_LE(Num
, thread::hardware_concurrency());
24 } // end anon namespace