MCPcopy Create free account
hub / github.com/CoolProp/CoolProp / TempJSONFile

Method TempJSONFile

src/Tests/CoolProp-Tests-PropsSIOptions.cpp:33–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 1

test_pidFunction · 0.85

Tested by

no test coverage detected