MCPcopy Create free account
hub / github.com/Kelsidavis/WoWee / writeTempJson

Function writeTempJson

tests/test_opcode_table.cpp:13–19  ·  view source on GitHub ↗

Helper: write a temporary JSON file and return its path. Uses the executable's directory to avoid permission issues.

Source from the content-addressed store, hash-verified

11// Helper: write a temporary JSON file and return its path.
12// Uses the executable's directory to avoid permission issues.
13static 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
21TEST_CASE("OpcodeTable loadFromJson basic mapping", "[opcode_table]") {
22 // CMSG_PING and SMSG_PONG are canonical opcodes present in the generated enum.

Callers 1

Calls 2

closeMethod · 0.45
stringMethod · 0.45

Tested by

no test coverage detected