fix mac build of gr unit test
Review URL: http://codereview.appspot.com/4351042/
git-svn-id: http://skia.googlecode.com/svn/trunk@1034 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/gr_unittests.cpp b/gpu/src/gr_unittests.cpp
index ef6b1e7..fd27f19 100644
--- a/gpu/src/gr_unittests.cpp
+++ b/gpu/src/gr_unittests.cpp
@@ -75,6 +75,9 @@
}
}
+// bogus empty class for GrBinHashKey
+class BogusEntry {};
+
static void test_binHashKey()
{
const char* testStringA = "abcdA";
@@ -83,11 +86,7 @@
kDataLenUsedForKey = 5
};
- class Entry {
- // bogus empty class
- };
-
- typedef GrBinHashKey<Entry, kDataLenUsedForKey> KeyType;
+ typedef GrBinHashKey<BogusEntry, kDataLenUsedForKey> KeyType;
KeyType keyA;
int passCnt = 0;
@@ -96,7 +95,7 @@
keyA.keyData(reinterpret_cast<const uint8_t*>(testStringA), kDataLenUsedForKey);
}
GrAssert(passCnt == 1); //We expect the static allocation to suffice
- GrBinHashKey<Entry, kDataLenUsedForKey-1> keyBust;
+ GrBinHashKey<BogusEntry, kDataLenUsedForKey-1> keyBust;
passCnt = 0;
while (keyBust.doPass()) {
++passCnt;
@@ -135,13 +134,13 @@
GrAssert(keyA.compare(keyA2) == 0);
//Test ownership tranfer and copying with key on heap
- GrBinHashKey<Entry, kDataLenUsedForKey-1> keyBust2;
+ GrBinHashKey<BogusEntry, kDataLenUsedForKey-1> keyBust2;
keyBust2.deepCopyFrom(keyBust);
GrAssert(keyBust.fIsValid);
GrAssert(keyBust2.fIsValid);
GrAssert(keyBust.getHash() == keyBust2.getHash());
GrAssert(keyBust.compare(keyBust2) == 0);
- GrBinHashKey<Entry, kDataLenUsedForKey-1> keyBust3;
+ GrBinHashKey<BogusEntry, kDataLenUsedForKey-1> keyBust3;
keyBust3.deepCopyFrom(keyBust);
GrAssert(keyBust.fIsValid == false);
GrAssert(keyBust3.fIsValid);