fix stringification of NEO_DRIVER_VERSION

use preprocessor sequence to convert define value to stirng:
 #define q(a) #a
 #define tostr(b) q(b)

Change-Id: If0a9ccfcc543523309be4995c05125bf8fbf2081
This commit is contained in:
Artur Harasimiuk
2018-03-28 23:55:09 +02:00
committed by sys_ocldev
parent 7f3c4d3d70
commit 7039ababb9
4 changed files with 11 additions and 5 deletions

View File

@ -672,7 +672,11 @@ TEST(Device_GetCaps, givenSystemWithNoDriverInfoWhenGettingNameAndVersionThenRet
tempName += familyName[platformDevices[0]->pPlatform->eRenderCoreFamily];
tempName += " HD Graphics NEO";
const std::string expectedVersion = NEO_DRIVER_VERSION;
#define QTR(a) #a
#define TOSTR(b) QTR(b)
const std::string expectedVersion = TOSTR(NEO_DRIVER_VERSION);
#undef QTR
#undef TOSTR
EXPECT_STREQ(tempName.c_str(), caps.name);
EXPECT_STREQ(expectedVersion.c_str(), caps.driverVersion);