Fixes
This commit is contained in:
@ -88,7 +88,6 @@ BOOL TestHexErrors()
|
||||
// Odd Length
|
||||
auto odd = IACore::Utils::HexStringToBinary("ABC");
|
||||
IAT_CHECK_NOT(odd.has_value());
|
||||
// Optional: IAT_CHECK_EQ(odd.error(), "Hex string must have even length");
|
||||
|
||||
// Invalid Characters
|
||||
auto invalid = IACore::Utils::HexStringToBinary("ZZTOP");
|
||||
@ -178,9 +177,8 @@ BOOL TestHashMacro()
|
||||
{
|
||||
TestVec3 v1{1.0f, 2.0f, 3.0f};
|
||||
TestVec3 v2{1.0f, 2.0f, 3.0f};
|
||||
TestVec3 v3{1.0f, 2.0f, 4.0f}; // Slight change
|
||||
TestVec3 v3{1.0f, 2.0f, 4.0f};
|
||||
|
||||
// Instantiate the hasher manually to verify the struct specialization exists
|
||||
ankerl::unordered_dense::hash<TestVec3> hasher;
|
||||
|
||||
UINT64 h1 = hasher(v1);
|
||||
@ -194,10 +192,6 @@ BOOL TestHashMacro()
|
||||
// Verify ComputeHash integration
|
||||
// -------------------------------------------------------------
|
||||
|
||||
// We cannot check EQ(h1, ComputeHash(v1)) because ComputeHash applies
|
||||
// one extra layer of "Golden Ratio Mixing" on top of the object's hash.
|
||||
// Instead, we verify that ComputeHash behaves exactly like a manual HashCombine.
|
||||
|
||||
UINT64 hManual = 0;
|
||||
IACore::Utils::HashCombine(hManual, v1);
|
||||
|
||||
@ -206,7 +200,7 @@ BOOL TestHashMacro()
|
||||
// This proves ComputeHash found the specialization and mixed it correctly
|
||||
IAT_CHECK_EQ(hManual, hWrapper);
|
||||
|
||||
// Optional: Verify the avalanche effect took place (hWrapper should NOT be h1)
|
||||
// Verify the avalanche effect took place (hWrapper should NOT be h1)
|
||||
IAT_CHECK_NEQ(h1, hWrapper);
|
||||
|
||||
return TRUE;
|
||||
|
||||
Reference in New Issue
Block a user