pull/1679/head
Feist Josselin 2 years ago committed by alpharush
parent 94b42ee96f
commit c08cbee3ec
  1. 5
      tests/function_features/abstract.sol
  2. 5
      tests/function_features/implicit_abstract.sol
  3. 15
      tests/test_features.py

@ -0,0 +1,5 @@
pragma solidity ^0.8.0;
abstract contract ExplicitAbstract{
function f() virtual public;
}

@ -0,0 +1,5 @@
pragma solidity ^0.5.0;
contract ImplicitAbstract{
function f() public;
}

@ -202,3 +202,18 @@ def test_using_for_global_collision() -> None:
compilation = CryticCompile(standard_json)
sl = Slither(compilation)
_run_all_detectors(sl)
def test_abstract_contract() -> None:
solc_select.switch_global_version("0.8.0", always_install=True)
slither = Slither("./tests/function_features/abstract.sol")
assert not slither.contracts[0].is_fully_implemented
solc_select.switch_global_version("0.5.0", always_install=True)
slither = Slither("./tests/function_features/implicit_abstract.sol")
assert not slither.contracts[0].is_fully_implemented
slither = Slither(
"./tests/function_features/implicit_abstract.sol", solc_force_legacy_json=True
)
assert not slither.contracts[0].is_fully_implemented

Loading…
Cancel
Save