Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not run tests in abstract contracts #769

Closed
CodeSandwich opened this issue Sep 6, 2021 · 1 comment · Fixed by #785
Closed

Do not run tests in abstract contracts #769

CodeSandwich opened this issue Sep 6, 2021 · 1 comment · Fixed by #785

Comments

@CodeSandwich
Copy link
Contributor

Writing abstract contract MyTest is DSTest { derails the testing suite:

Running 1 tests for src/test/MyTest.t.sol:MyTest
hevm: Data.Binary.Get.runGet at position 0: not enough bytes
uint256
bool
CallStack (from HasCallStack):
  error, called at libraries/binary/src/Data/Binary/Get.hs:351:5 in binary-0.8.8.0:Data.Binary.Get

AFAIK there's no way to tell the testing suite to ignore a contract. It's included for running even before attempted compilation based on the ABI and there's no way to hide IS_TEST.

@d-xo
Copy link
Contributor

d-xo commented Sep 7, 2021

nice catch! I think we can fix this by only executing test contracts that actually have code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants