| 373 | } |
| 374 | |
| 375 | void DumpFlagsXML() { |
| 376 | vector<CommandLineFlagInfo> flags; |
| 377 | GetAllFlags(&flags); |
| 378 | |
| 379 | cout << "<?xml version=\"1.0\"?>" << endl; |
| 380 | cout << "<AllFlags>" << endl; |
| 381 | cout << strings::Substitute( |
| 382 | "<program>$0</program>", |
| 383 | EscapeForHtmlToString(BaseName(google::ProgramInvocationShortName()))) << endl; |
| 384 | cout << strings::Substitute( |
| 385 | "<usage>$0</usage>", |
| 386 | EscapeForHtmlToString(google::ProgramUsage())) << endl; |
| 387 | |
| 388 | for (const CommandLineFlagInfo& flag : flags) { |
| 389 | cout << DescribeOneFlagInXML(flag) << endl; |
| 390 | } |
| 391 | |
| 392 | cout << "</AllFlags>" << endl; |
| 393 | } |
| 394 | |
| 395 | // Check that, if any flags tagged with 'tag' have been specified to |
| 396 | // non-default values, that 'unlocked' is true. If so (i.e. if the |
no test coverage detected