diff options
author | Grazvydas Ignotas <[email protected]> | 2017-03-16 01:09:28 +0200 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-03-21 11:15:52 +1100 |
commit | af73acca2b3f3e1adbdff62e0ca085979dc5974c (patch) | |
tree | 8f54adb1a675aef2c44bccb4ebf6cc2d8e6bce13 /src/compiler/glsl/tests/cache_test.c | |
parent | 529a767041c880f90c4465cb34a89430459c7fce (diff) |
tests/cache_test: use the blob key's actual first byte
There is no need to hardcode it, we can just use blob_key[0].
This is needed because the next patches are going to change how cache
keys are computed.
Signed-off-by: Grazvydas Ignotas <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/glsl/tests/cache_test.c')
-rw-r--r-- | src/compiler/glsl/tests/cache_test.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/compiler/glsl/tests/cache_test.c b/src/compiler/glsl/tests/cache_test.c index ee6e84b45a4..b1b3c33535e 100644 --- a/src/compiler/glsl/tests/cache_test.c +++ b/src/compiler/glsl/tests/cache_test.c @@ -255,12 +255,8 @@ static void test_put_and_get(void) { struct disk_cache *cache; - /* If the text of this blob is changed, then blob_key_byte_zero - * also needs to be updated. - */ char blob[] = "This is a blob of thirty-seven bytes"; uint8_t blob_key[20]; - uint8_t blob_key_byte_zero = 0xca; char string[] = "While this string has thirty-four"; uint8_t string_key[20]; char *result; @@ -333,7 +329,7 @@ test_put_and_get(void) * directory as the original blob first written to the cache. */ disk_cache_compute_key(cache, one_KB, 1024, one_KB_key); - one_KB_key[0] = blob_key_byte_zero; + one_KB_key[0] = blob_key[0]; disk_cache_put(cache, one_KB_key, one_KB, 1024); @@ -403,7 +399,7 @@ test_put_and_get(void) one_MB = calloc(1024, 1024); disk_cache_compute_key(cache, one_MB, 1024 * 1024, one_MB_key); - one_MB_key[0] = blob_key_byte_zero;; + one_MB_key[0] = blob_key[0]; disk_cache_put(cache, one_MB_key, one_MB, 1024 * 1024); |