aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2014-11-21 06:48:43 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-21 06:48:43 -0800
commit19996eda62181982d35c36e29515c1fe9c9fb2a3 (patch)
tree875e17a49ffba92d6537b6490af5f685ee05c966 /tests
parent5b69377507478623dcf5b11f3ecb010f87c4794f (diff)
Small changes to get things building and running on Linux/ARM.
ninja -C out/Debug works, and I tested out/Debug/dm --nogpu (no X yet). The only problems encountered were: - Like CrOS, I also needed to use the default float ABI (presumably hard). - The strings in GrBinHashKeyTest weren't necessarily 4-byte aligned. BUG=skia: Review URL: https://codereview.chromium.org/746043002
Diffstat (limited to 'tests')
-rw-r--r--tests/GrBinHashKeyTest.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/GrBinHashKeyTest.cpp b/tests/GrBinHashKeyTest.cpp
index 605fd9f29a..175719d3cd 100644
--- a/tests/GrBinHashKeyTest.cpp
+++ b/tests/GrBinHashKeyTest.cpp
@@ -13,11 +13,17 @@
#include "Test.h"
+struct AlignedKey {
+ uint32_t align;
+ char key[8];
+};
+
template<typename KeyType> static void TestHash(skiatest::Reporter* reporter) {
- const char* testStringA_ = "abcdABCD";
- const char* testStringB_ = "abcdBBCD";
- const uint32_t* testStringA = reinterpret_cast<const uint32_t*>(testStringA_);
- const uint32_t* testStringB = reinterpret_cast<const uint32_t*>(testStringB_);
+ AlignedKey a, b;
+ memcpy(&a.key, "abcdABCD", 8);
+ memcpy(&b.key, "abcdBBCD", 8);
+ const uint32_t* testStringA = reinterpret_cast<const uint32_t*>(&a.key);
+ const uint32_t* testStringB = reinterpret_cast<const uint32_t*>(&b.key);
KeyType keyA;
keyA.setKeyData(testStringA);