| 567 | |
| 568 | |
| 569 | vector<CommandLineFlagInfo> GetNonDefaultFlagsHelper() { |
| 570 | vector<CommandLineFlagInfo> all_flags; |
| 571 | GetAllFlags(&all_flags); |
| 572 | vector<CommandLineFlagInfo> non_default_flags; |
| 573 | std::copy_if(all_flags.begin(), all_flags.end(), std::back_inserter(non_default_flags), |
| 574 | [] (const auto& flag) { |
| 575 | // In addition to checking that the flag has been rewritten with 'is_default', |
| 576 | // we also check that the value is different from the default value. |
| 577 | return !flag.is_default && flag.current_value != flag.default_value; |
| 578 | }); |
| 579 | return non_default_flags; |
| 580 | } |
| 581 | |
| 582 | string GetNonDefaultFlags() { |
| 583 | ostringstream args; |
no test coverage detected