Skip to content

Allow to disable testing of view/pure function, except prefix ones in property mode#1552

Open
gustavo-grieco wants to merge 3 commits into
masterfrom
dev-disable-pureview
Open

Allow to disable testing of view/pure function, except prefix ones in property mode#1552
gustavo-grieco wants to merge 3 commits into
masterfrom
dev-disable-pureview

Conversation

@gustavo-grieco

Copy link
Copy Markdown
Collaborator

Fixes #1351

@elopez elopez added the ci-all-solc Test a PR with all solc versions label Jun 3, 2026
gustavo-grieco and others added 2 commits June 17, 2026 07:42
- default.yaml: add excludeViewPure (the config test requires every option be
  listed; it was failing with 'unset options: fromList ["excludeViewPure"]')
- Tests/Integration: pin basic/excludeviewpure.sol to solc >= 0.8.0 (pragma
  ^0.8.0), so it is skipped on the <0.8 solc CI matrix instead of failing to
  compile.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment on lines +41 to +42
[ ("view property must not be excluded and should be solved", solved "echidna_counter_small")
]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if this asserted somehow that the view functions are not called. Maybe add an assert(false); on a view function to make sure nobody calls it?

Comment thread src/test/Common.hs
Comment on lines +236 to +242
notPresent :: Text -> (Env, WorkerState) -> IO Bool
notPresent n (env, _) = do
tests <- traverse readIORef env.testRefs
pure $ case getResult n tests of
Nothing -> True
_ -> False

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be unused, please remove it if not needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-all-solc Test a PR with all solc versions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Config toggle to disable fuzzing view functions

2 participants