#include "base/task/thread_pool/environment_config.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
namespace internal {
TEST(ThreadPoolEnvironmentConfig, CanUseBackgroundPriorityForWorker) {
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE)
EXPECT_TRUE(CanUseBackgroundThreadTypeForWorkerThread());
#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \
BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_NACL) || defined(OHOS_UNITTESTS)
EXPECT_FALSE(CanUseBackgroundThreadTypeForWorkerThread());
#else
#error Platform doesn't match any block
#endif
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID) || defined(OHOS_UNITTESTS)
EXPECT_TRUE(CanUseUtilityThreadTypeForWorkerThread());
#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || \
BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_NACL)
EXPECT_FALSE(CanUseUtilityThreadTypeForWorkerThread());
#else
#error Platform doesn't match any block
#endif
}
}
}