| 95 | } |
| 96 | |
| 97 | void write_file(const std::string &path, const std::vector<uint8_t> &data) { |
| 98 | std::ofstream output(path, std::ios::binary | std::ios::trunc); |
| 99 | if (!output) { |
| 100 | fail("Failed to open file for writing: " + path); |
| 101 | } |
| 102 | output.write(reinterpret_cast<const char *>(data.data()), |
| 103 | static_cast<std::streamsize>(data.size())); |
| 104 | output.flush(); |
| 105 | output.close(); |
| 106 | } |
| 107 | |
| 108 | // --------------------------------------------------------------------------- |
| 109 | // xlang model definitions shared with Java/Rust tests |
no test coverage detected