mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 21:05:56 -05:00
tests: Added operator test
This commit is contained in:
@@ -86,13 +86,13 @@ int test(int argc, char **argv) {
|
||||
};
|
||||
|
||||
// Check if the right number of patterns have been produced
|
||||
if (patterns->size() != currTest->getPatterns().size()) {
|
||||
if (patterns->size() != currTest->getPatterns().size() && !currTest->getPatterns().empty()) {
|
||||
hex::log::fatal("Source didn't produce expected number of patterns");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
// Check if the produced patterns are the ones expected
|
||||
for (u32 i = 0; i < patterns->size(); i++) {
|
||||
for (u32 i = 0; i < currTest->getPatterns().size(); i++) {
|
||||
auto &left = *patterns->at(i);
|
||||
auto &right = *currTest->getPatterns().at(i);
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "test_patterns/test_pattern_succeeding_assert.hpp"
|
||||
#include "test_patterns/test_pattern_failing_assert.hpp"
|
||||
#include "test_patterns/test_pattern_bitfields.hpp"
|
||||
#include "test_patterns/test_pattern_math.hpp"
|
||||
|
||||
std::array Tests = {
|
||||
TEST(Placement),
|
||||
@@ -19,5 +20,6 @@ std::array Tests = {
|
||||
TEST(Padding),
|
||||
TEST(SucceedingAssert),
|
||||
TEST(FailingAssert),
|
||||
TEST(Bitfields)
|
||||
TEST(Bitfields),
|
||||
TEST(Math)
|
||||
};
|
||||
Reference in New Issue
Block a user