MCPcopy Create free account
hub / github.com/CLIUtils/CLI11 / EvilConfig

Class EvilConfig

tests/ConfigFileTest.cpp:823–829  ·  view source on GitHub ↗

Define a class for testing purposes that does bad things

Source from the content-addressed store, hash-verified

821
822/// Define a class for testing purposes that does bad things
823class EvilConfig : public CLI::Config {
824 public:
825 EvilConfig() = default;
826 std::string to_config(const CLI::App *, bool, bool, std::string) const override { throw CLI::FileError("evil"); }
827
828 std::vector<CLI::ConfigItem> from_config(std::istream &) const override { throw CLI::FileError("evil"); }
829};
830
831TEST_CASE_METHOD(TApp, "IniRequiredbadConfigurator", "[config]") {
832

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected