MCPcopy Create free account
hub / github.com/PowerGridModel/power-grid-model / main

Function main

tests/package_tests/test_c_api_package.cpp:20–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18} // namespace
19
20auto main() -> int {
21 // get handle from C-API
22 HandlePtr const c_handle{PGM_create_handle()};
23 std::cout << (c_handle ? "Handle created: C-API is available.\n" : "No handle could be created.\n");
24 // get handle from C++ API
25 power_grid_model_cpp::Handle const cpp_handle{};
26 std::cout << (cpp_handle.get() ? "Handle created: C++ API is available.\n" : "No handle could be created.\n");
27 int return_code = (c_handle != nullptr) && (cpp_handle.get() != nullptr) ? 0 : 1;
28 return return_code;
29}

Callers

nothing calls this directly

Calls 2

PGM_create_handleFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected