Skip to content

Enhancement: Add ACN Mutator (assert(...) Condition Negation) #2999

@sidarth16

Description

@sidarth16

Why

We already have operator-level mutators (ROR, LOR, etc.), and require(...) condition negation is being tracked separately in #2998.

This issue tracks the assert(...) counterpart so the scopes stay small and reviewable.

Negating the full assert condition is useful for checking whether invariant-style assertions are meaningfully exercised by tests.

What

Add mutator ACN that negates the first assert condition argument:

  • assert(x > 0 && x < 10) -> assert(!(x > 0 && x < 10))
  • assert(msg.sender == owner) -> assert(!(msg.sender == owner))

Scope

This issue only covers assert(...) condition negation.

require(...) condition negation is covered in #2998

Notes

This is intentionally split from #2998, so require(...) and assert(...) condition negation can be reviewed in separate PRs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions