add validator tests for platform

Change-Id: I144b93cc24683600fe507f9b66dbbba84a182c5c
This commit is contained in:
Jacek Danecki
2018-04-04 17:26:54 +02:00
committed by sys_ocldev
parent d977d278b4
commit 375933f0de

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Intel Corporation
* Copyright (c) 2017 - 2018, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@ -143,6 +143,16 @@ TEST(NonZeroBufferSizeValidator, nonZero) {
EXPECT_EQ(CL_SUCCESS, validateObjects(bsv));
}
TEST(Platform, givenNullPlatformThenReturnInvalidPlatform) {
cl_platform_id platform = nullptr;
EXPECT_EQ(CL_INVALID_PLATFORM, validateObjects(platform));
}
TEST(Platform, givenPlatformThenReturnSUCCESS) {
_cl_platform_id clPlatform;
EXPECT_EQ(CL_SUCCESS, validateObjects(clPlatform));
}
typedef ::testing::TestWithParam<size_t> PatternSizeValid;
TEST_P(PatternSizeValid, valid) {