| 31 | { |
| 32 | public: |
| 33 | explicit TempJSONFile(const std::string& contents) { |
| 34 | path_ = std::filesystem::temp_directory_path() |
| 35 | / ("cp_propssi_opts_test_" + std::to_string(CoolProp::tests::test_pid()) + "_" + std::to_string(counter_++) + ".json"); |
| 36 | std::ofstream(path_) << contents; |
| 37 | } |
| 38 | ~TempJSONFile() { |
| 39 | std::error_code ec; |
| 40 | std::filesystem::remove(path_, ec); |
nothing calls this directly
no test coverage detected