Make sure that there is at least one scenario, otherwise indicates malformed

input
pull/6252/head
Vijay Pai 9 years ago
parent e368d8f5fd
commit dfdfe26958
  1. 3
      test/cpp/qps/qps_json_driver.cc

@ -104,6 +104,9 @@ static void QpsDriver() {
} }
GPR_ASSERT(scenarios.ParseFromString(binary)); GPR_ASSERT(scenarios.ParseFromString(binary));
// Make sure that there is at least some valid scenario here
GPR_ASSERT(scenarios.scenarios_size() > 0);
for (int i = 0; i < scenarios.scenarios_size(); i++) { for (int i = 0; i < scenarios.scenarios_size(); i++) {
const Scenario &scenario = scenarios.scenarios(i); const Scenario &scenario = scenarios.scenarios(i);
std::cerr << "RUNNING SCENARIO: " << scenario.name() << "\n"; std::cerr << "RUNNING SCENARIO: " << scenario.name() << "\n";

Loading…
Cancel
Save