clang: make linter happy
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
@@ -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);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "bus.hh"
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
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
|
||||
|
@@ -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
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "cpu/arm/instruction.hh"
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
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
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "cpu/thumb/instruction.hh"
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
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
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "memory.hh"
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
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
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "util/bits.hh"
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
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
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "util/crypto.hh"
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
static constexpr auto TAG = "[util][crypto]";
|
||||
#define TAG "[util][crypto]"
|
||||
|
||||
TEST_CASE("sha256 matar", TAG) {
|
||||
std::array<uint8_t, 5> data = { 'm', 'a', 't', 'a', 'r' };
|
||||
@@ -19,3 +19,5 @@ TEST_CASE("sha256 forgis", TAG) {
|
||||
CHECK(crypto::sha256(data) ==
|
||||
"cfddca2ce2673f355518cbe2df2a8522693c54723a469e8b36a4f68b90d2b759");
|
||||
}
|
||||
|
||||
#undef TAG
|
||||
|
Reference in New Issue
Block a user