summaryrefslogtreecommitdiff
path: root/Source/UnitTests/Core/DSP/DSPAssemblyTest.cpp
diff options
context:
space:
mode:
authorPokechu22 <Pokechu022@gmail.com>2022-06-13 19:00:15 -0700
committerPokechu22 <Pokechu022@gmail.com>2022-06-14 12:22:06 -0700
commit6a2ec825a225d07208d61aeeaf62c3c5525745f0 (patch)
treebbd1198a005cfe60ea9d1cfa3e39973438ed8b2b /Source/UnitTests/Core/DSP/DSPAssemblyTest.cpp
parent2d774010c3db58af0601684dcb0e348cf3f638e5 (diff)
UnitTests: Fail DSPAssemblyTest if the assembled code doesn't match the expected result
This reveals that both HermesText and HermesBinary fail. HermesBinary would have failed on master, too, if this had been implemented.
Diffstat (limited to 'Source/UnitTests/Core/DSP/DSPAssemblyTest.cpp')
-rw-r--r--Source/UnitTests/Core/DSP/DSPAssemblyTest.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/UnitTests/Core/DSP/DSPAssemblyTest.cpp b/Source/UnitTests/Core/DSP/DSPAssemblyTest.cpp
index c9d21bb9a0..17e4d70b3d 100644
--- a/Source/UnitTests/Core/DSP/DSPAssemblyTest.cpp
+++ b/Source/UnitTests/Core/DSP/DSPAssemblyTest.cpp
@@ -46,8 +46,8 @@ static bool RoundTrip(const std::vector<u16>& code1)
}
if (!DSP::Compare(code1, code2))
{
- DSP::Disassemble(code1, true, text);
- fmt::print("{}", text);
+ fmt::print("RoundTrip: Assembled code does not match input code\n");
+ return false;
}
return true;
}
@@ -81,6 +81,12 @@ static bool SuperTrip(const char* asm_code)
fmt::print("SuperTrip: Second assembly failed\n");
return false;
}
+
+ if (!DSP::Compare(code1, code2))
+ {
+ fmt::print("SuperTrip: Assembled code does not match between passes\n");
+ return false;
+ }
return true;
}