add regression tests for reference API on windows

pull/2371/head
alpharush 8 months ago
parent 209df4ea76
commit 84c3199458
  1. 9
      tests/unit/core/test_source_mapping.py

@ -1,5 +1,5 @@
from pathlib import Path
import pytest
from slither import Slither
from slither.core.declarations import Function, CustomErrorTopLevel, EventTopLevel
from slither.core.solidity_types.type_alias import TypeAliasTopLevel, TypeAliasContract
@ -8,9 +8,10 @@ from slither.core.variables.top_level_variable import TopLevelVariable
TEST_DATA_DIR = Path(__file__).resolve().parent / "test_data"
SRC_MAPPING_TEST_ROOT = Path(TEST_DATA_DIR, "src_mapping")
def test_source_mapping_inheritance(solc_binary_path):
solc_path = solc_binary_path("0.6.12")
# Ensure issue fixed in https://github.com/crytic/crytic-compile/pull/554 does not regress in Slither's reference lookup.
@pytest.mark.parametrize("solc_version", ["0.6.12", "0.8.7", "0.8.8"])
def test_source_mapping_inheritance(solc_binary_path, solc_version):
solc_path = solc_binary_path(solc_version)
file = Path(SRC_MAPPING_TEST_ROOT, "inheritance.sol").as_posix()
slither = Slither(file, solc=solc_path)

Loading…
Cancel
Save