Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct MutationConfig
- {
- };
- struct MutationResult
- {
- bool success;
- bool flag;
- std::string message;
- };
- class BaseMutator
- {
- public:
- virtual ~BaseMutator() = default;
- BaseMutator(const MutationConfig& config)
- : _config(config) {}
- protected:
- virtual void mutate(MutationResult& result) = 0;
- MutationConfig _config;
- };
- class StandardMutator : public BaseMutator
- {
- public:
- explicit StandardMutator(const MutationConfig &config) : BaseMutator(config) {}
- protected:
- void mutate(MutationResult &result) override
- {
- }
- };
- class CharMutator : public StandardMutator
- {
- public:
- explicit CharMutator(const MutationConfig &config) : StandardMutator(config) {}
- protected:
- void mutate(MutationResult &result) override
- {
- StandardMutator::mutate(result);
- }
- };
- class StringMutator : public CharMutator
- {
- public:
- explicit StringMutator(const MutationConfig &config) : CharMutator(config) {}
- protected:
- void mutate(MutationResult &result) override
- {
- CharMutator::mutate(result);
- }
- };
- class IntMutator : public StandardMutator
- {
- public:
- explicit IntMutator(const MutationConfig &config) : StandardMutator(config) {}
- protected:
- void mutate(MutationResult &result) override
- {
- StandardMutator::mutate(result);
- }
- };
- class ArrayIntMutator : public IntMutator
- {
- public:
- explicit ArrayIntMutator(const MutationConfig &config) : IntMutator(config) {}
- protected:
- void mutate(MutationResult &result) override
- {
- IntMutator::mutate(result);
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement