Helper: write a temporary JSON file and return its path. Uses the executable's directory to avoid permission issues.
| 11 | // Helper: write a temporary JSON file and return its path. |
| 12 | // Uses the executable's directory to avoid permission issues. |
| 13 | static std::string writeTempJson(const std::string& content) { |
| 14 | auto path = std::filesystem::temp_directory_path() / "wowee_test_opcodes.json"; |
| 15 | std::ofstream f(path); |
| 16 | f << content; |
| 17 | f.close(); |
| 18 | return path.string(); |
| 19 | } |
| 20 | |
| 21 | TEST_CASE("OpcodeTable loadFromJson basic mapping", "[opcode_table]") { |
| 22 | // CMSG_PING and SMSG_PONG are canonical opcodes present in the generated enum. |
no test coverage detected