diff --git a/src/cpu/thumb/disassembler.cc b/src/cpu/thumb/disassembler.cc index 08eafa1..436da4b 100644 --- a/src/cpu/thumb/disassembler.cc +++ b/src/cpu/thumb/disassembler.cc @@ -132,9 +132,8 @@ Instruction::disassemble() { }, [](SoftwareInterrupt) { return std::string("SWI"); }, [](ConditionalBranch& data) { - return fmt::format("B{} {:d}", - stringify(data.condition), - data.offset); + return fmt::format( + "B{} {:d}", stringify(data.condition), data.offset); }, [](UnconditionalBranch& data) { return fmt::format("B {:d}", data.offset); diff --git a/tests/bus.cc b/tests/bus.cc index 9bef370..b565b56 100644 --- a/tests/bus.cc +++ b/tests/bus.cc @@ -1,7 +1,7 @@ #include "bus.hh" #include -static constexpr auto TAG = "[bus]"; +#define TAG "[bus]" using namespace matar; @@ -41,3 +41,5 @@ TEST_CASE_METHOD(BusFixture, "Word", TAG) { CHECK(bus.read_halfword(100724276) == 0x491D); CHECK(bus.read_byte(100724276) == 0x1D); } + +#undef TAG diff --git a/tests/cpu/arm/exec.cc b/tests/cpu/arm/exec.cc index 079d1a0..6462f9f 100644 --- a/tests/cpu/arm/exec.cc +++ b/tests/cpu/arm/exec.cc @@ -34,7 +34,7 @@ class CpuFixture { }; }; -static constexpr auto TAG = "[arm][execution]"; +#define TAG "[arm][execution]" using namespace arm; @@ -1073,3 +1073,5 @@ TEST_CASE_METHOD(CpuFixture, "Data Processing", TAG) { CHECK(cpu.spsr.raw() == cpu.cpsr.raw()); } } + +#undef TAG diff --git a/tests/cpu/arm/instruction.cc b/tests/cpu/arm/instruction.cc index 00e7d98..c571e6b 100644 --- a/tests/cpu/arm/instruction.cc +++ b/tests/cpu/arm/instruction.cc @@ -1,7 +1,7 @@ #include "cpu/arm/instruction.hh" #include -static constexpr auto TAG = "[arm][disassembly]"; +#define TAG "[arm][disassembly]" using namespace matar; using namespace arm; @@ -505,3 +505,5 @@ TEST_CASE("Software Interrupt", TAG) { CHECK(instruction.disassemble() == "SWIEQ"); #endif } + +#undef TAG diff --git a/tests/cpu/thumb/instruction.cc b/tests/cpu/thumb/instruction.cc index c19465f..6e510a3 100644 --- a/tests/cpu/thumb/instruction.cc +++ b/tests/cpu/thumb/instruction.cc @@ -1,7 +1,7 @@ #include "cpu/thumb/instruction.hh" #include -static constexpr auto TAG = "[thumb][disassembly]"; +#define TAG "[thumb][disassembly]" using namespace matar; using namespace thumb; @@ -437,3 +437,5 @@ TEST_CASE("Long Branch with link") { CHECK(instruction.disassemble() == "BLH 2520"); #endif } + +#undef TAG diff --git a/tests/memory.cc b/tests/memory.cc index 252ed7a..5c94fa2 100644 --- a/tests/memory.cc +++ b/tests/memory.cc @@ -1,7 +1,7 @@ #include "memory.hh" #include -static constexpr auto TAG = "[memory]"; +#define TAG "[memory]" using namespace matar; @@ -119,3 +119,5 @@ TEST_CASE("rom", TAG) { CHECK(memory.read(0xCEF0256) == 0x10); } } + +#undef TAG diff --git a/tests/util/bits.cc b/tests/util/bits.cc index d292939..6d6fcf1 100644 --- a/tests/util/bits.cc +++ b/tests/util/bits.cc @@ -1,7 +1,7 @@ #include "util/bits.hh" #include -static constexpr auto TAG = "[util][bits]"; +#define TAG "[util][bits]" TEST_CASE("8 bits", TAG) { uint8_t num = 45; @@ -104,3 +104,5 @@ TEST_CASE("64 bits", TAG) { // 0b011010001 CHECK(bit_range(num, 39, 47) == 209); } + +#undef TAG diff --git a/tests/util/crypto.cc b/tests/util/crypto.cc index 54eac3c..00152fb 100644 --- a/tests/util/crypto.cc +++ b/tests/util/crypto.cc @@ -1,7 +1,7 @@ #include "util/crypto.hh" #include -static constexpr auto TAG = "[util][crypto]"; +#define TAG "[util][crypto]" TEST_CASE("sha256 matar", TAG) { std::array data = { 'm', 'a', 't', 'a', 'r' }; @@ -19,3 +19,5 @@ TEST_CASE("sha256 forgis", TAG) { CHECK(crypto::sha256(data) == "cfddca2ce2673f355518cbe2df2a8522693c54723a469e8b36a4f68b90d2b759"); } + +#undef TAG