| 50 | } |
| 51 | |
| 52 | bool test_gamestate_serialization(OpenApoc::sp<OpenApoc::GameState> state) |
| 53 | { |
| 54 | |
| 55 | std::stringstream ss; |
| 56 | ss << "openapoc_test_serialize-" << std::this_thread::get_id(); |
| 57 | auto tempPath = fs::temp_directory_path() / ss.str(); |
| 58 | OpenApoc::UString pathString(tempPath.string()); |
| 59 | LogInfo("Writing temp state to \"%s\"", pathString); |
| 60 | if (!test_gamestate_serialization_roundtrip(state, pathString)) |
| 61 | { |
| 62 | LogWarning("Packed save test failed"); |
| 63 | return false; |
| 64 | } |
| 65 | |
| 66 | fs::remove(tempPath); |
| 67 | |
| 68 | return true; |
| 69 | } |
| 70 | |
| 71 | int main(int argc, char **argv) |
| 72 | { |
no test coverage detected