MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / checkGetCallbackDataOutDouble

Function checkGetCallbackDataOutDouble

check/TestCAPI.c:85–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void checkGetCallbackDataOutDouble(const HighsCallbackDataOut* data_out,
86 const char* name, double value) {
87 const void* name_p = Highs_getCallbackDataOutItem(data_out, name);
88 if (!name_p) {
89 printf("checkGetCallbackDataOutDouble fail for %s\n", name);
90 assert(name_p);
91 } else {
92 double check_value = *(double*)(name_p);
93 double value_ok = check_value == value;
94 if (!value_ok)
95 printf(
96 "checkGetCallbackDataOutDouble fail for %s (%g = check_value != "
97 "value = %g)\n",
98 name, check_value, value);
99 assert(value_ok);
100 }
101}
102
103static void userCallback(const int callback_type, const char* message,
104 const HighsCallbackDataOut* data_out,

Callers 1

userCallbackFunction · 0.85

Calls 1

Tested by

no test coverage detected