MCPcopy Create free account
hub / github.com/3rdparty/libprocess / foreachpair

Function foreachpair

src/tests/metrics_tests.cpp:523–531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

521 // Pull the response values into a map.
522 hashmap<string, double> responseValues;
523 foreachpair (const string& key,
524 const JSON::Value& value,
525 responseJSON->values) {
526 if (value.is<JSON::Number>()) {
527 // "test/counter/count" is an integer, everything else is a double.
528 JSON::Number number = value.as<JSON::Number>();
529 responseValues[key] = number.as<double>();
530 }
531 }
532
533 // Ensure the expected keys are in the response and that the values match
534 // expectations.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected