srctree

Johan parent a868e492 9db58383 710163ad
Merge pull request #288 from johnor/suppress-line-cov

Suppress unreachable lines from gcovr
core/src/opcode.cpp added: 8, removed: 5, total 3
@@ -467,7 +467,7 @@ MemoryAccess get_memory_access(const Family family) {
return MemoryAccess::ReadWrite;
}
// Should not happen
throw std::logic_error("Unknown family");
throw std::logic_error("Unknown family"); // GCOVR_EXCL_LINE
}
 
std::string_view to_string(const Family family) {
@@ -595,7 +595,7 @@ std::string_view to_string(const Family family) {
}
 
// Should not happen
throw std::logic_error("Unknown family");
throw std::logic_error("Unknown family"); // GCOVR_EXCL_LINE
}
 
} // namespace n_e_s::core
 
disassembler/include/nes/disassembler.h added: 8, removed: 5, total 3
@@ -4,6 +4,8 @@
#include "nes/core/imos6502.h"
#include "nes/core/opcode.h"
 
#include <cstdlib>
 
namespace n_e_s::dis {
 
constexpr int get_arg_count(n_e_s::core::AddressMode mode) {
@@ -25,7 +27,8 @@ constexpr int get_arg_count(n_e_s::core::AddressMode mode) {
case n_e_s::core::AddressMode::Indirect:
return 2;
}
return 0;
// Should not happen
std::abort(); // GCOVR_EXCL_LINE
}
 
std::string disassemble(const uint16_t address,