#include "common/platform.h"
#include "gpu_info_util/SystemInfo_internal.h"
#if defined(ANGLE_PLATFORM_APPLE)
# include "common/apple_platform_utils.h"
#endif
#include <gtest/gtest.h>
usingnamespaceangle;
namespace
{
TEST(SystemInfoTest, AMDBrahmaVersionParsing)
{ … }
TEST(SystemInfoTest, AMDCatalystVersionParsing)
{ … }
#if defined(ANGLE_PLATFORM_MACOS)
TEST(SystemInfoTest, MacMachineModelParsing)
{
std::string model;
int32_t major = 1, minor = 2;
EXPECT_FALSE(ParseMacMachineModel("", &model, &major, &minor));
EXPECT_EQ(0U, model.length());
EXPECT_EQ(1, major);
EXPECT_EQ(2, minor);
EXPECT_FALSE(ParseMacMachineModel("FooBar", &model, &major, &minor));
EXPECT_TRUE(ParseMacMachineModel("MacPro4,1", &model, &major, &minor));
EXPECT_EQ("MacPro", model);
EXPECT_EQ(4, major);
EXPECT_EQ(1, minor);
EXPECT_TRUE(ParseMacMachineModel("MacBookPro6,2", &model, &major, &minor));
EXPECT_EQ("MacBookPro", model);
EXPECT_EQ(6, major);
EXPECT_EQ(2, minor);
}
#endif
TEST(SystemInfoTest, CMDeviceIDToDeviceAndVendorID)
{ … }
}