Skip to content

Commit e50039b

Browse files
ULT renaming: Compiler Interface Cached tests
Related-To: NEO-2236 Change-Id: I1003a6122420bb9e3d6cf56df838418f672484f5 Signed-off-by: Adam Cetnerowski <[email protected]>
1 parent 3c27e97 commit e50039b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

core/unit_tests/compiler_interface/compiler_cache_tests.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ TEST(HashGeneration, givenMisalignedBufferWithSizeOneWhenPassedToUpdateFunctionT
116116
alignedFree(originalPtr);
117117
}
118118

119-
TEST(CompilerCacheHashTests, hashShortBuffers) {
119+
TEST(CompilerCacheHashTests, WhenHashingThenResultIsDeterministic) {
120120
Hash hash;
121121

122122
std::list<uint64_t> hashes;
@@ -140,7 +140,7 @@ TEST(CompilerCacheHashTests, hashShortBuffers) {
140140
}
141141
}
142142

143-
TEST(CompilerCacheHashTests, testUnique) {
143+
TEST(CompilerCacheHashTests, GivenCompilingOptionsWhenGettingCacheThenCorrectCacheIsReturned) {
144144
static const size_t bufSize = 64;
145145
HardwareInfo hwInfo;
146146

@@ -219,7 +219,7 @@ TEST(CompilerCacheHashTests, testUnique) {
219219
EXPECT_STREQ(hash.c_str(), hash2.c_str());
220220
}
221221

222-
TEST(CompilerCacheTests, doNotCacheEmpty) {
222+
TEST(CompilerCacheTests, GivenEmptyBinaryWhenCachingThenBinaryIsNotCached) {
223223
CompilerCache cache(CompilerCacheConfig{});
224224
bool ret = cache.cacheBinary("some_hash", nullptr, 12u);
225225
EXPECT_FALSE(ret);
@@ -229,15 +229,15 @@ TEST(CompilerCacheTests, doNotCacheEmpty) {
229229
EXPECT_FALSE(ret);
230230
}
231231

232-
TEST(CompilerCacheTests, loadNotFound) {
232+
TEST(CompilerCacheTests, GivenNonExistantConfigWhenLoadingFromCacheThenNullIsReturned) {
233233
CompilerCache cache(CompilerCacheConfig{});
234234
size_t size;
235235
auto ret = cache.loadCachedBinary("----do-not-exists----", size);
236236
EXPECT_EQ(nullptr, ret);
237237
EXPECT_EQ(0U, size);
238238
}
239239

240-
TEST(CompilerCacheTests, cacheThenLoad) {
240+
TEST(CompilerCacheTests, GivenExistingConfigWhenLoadingFromCacheThenBinaryIsLoaded) {
241241
CompilerCache cache(getDefaultClCompilerCacheConfig());
242242
static const char *hash = "SOME_HASH";
243243
std::unique_ptr<char> data(new char[32]);
@@ -253,7 +253,7 @@ TEST(CompilerCacheTests, cacheThenLoad) {
253253
EXPECT_NE(0U, size);
254254
}
255255

256-
TEST(CompilerInterfaceCachedTests, notCachedAndIgcFailed) {
256+
TEST(CompilerInterfaceCachedTests, GivenNoCachedBinaryWhenBuildingThenErrorIsReturned) {
257257
TranslationInput inputArgs{IGC::CodeType::oclC, IGC::CodeType::oclGenBin};
258258

259259
auto src = "#include \"header.h\"\n__kernel k() {}";
@@ -282,7 +282,7 @@ TEST(CompilerInterfaceCachedTests, notCachedAndIgcFailed) {
282282
gEnvironment->igcPopDebugVars();
283283
}
284284

285-
TEST(CompilerInterfaceCachedTests, wasCached) {
285+
TEST(CompilerInterfaceCachedTests, GivenCachedBinaryWhenBuildingThenSuccessIsReturned) {
286286
TranslationInput inputArgs{IGC::CodeType::oclC, IGC::CodeType::oclGenBin};
287287

288288
auto src = "#include \"header.h\"\n__kernel k() {}";

0 commit comments

Comments
 (0)