mark currently failing IR tests as xfail

pull/1755/head
alpharush 2 years ago
parent 0131f5b08f
commit 9f56a91f73
  1. 26
      tests/test_ssa_generation.py

@ -374,7 +374,7 @@ def test_basic_loop_phi():
verify_properties_hold(contract)
@pytest.mark.skip(reason="Fails in current slither version. Fix in #1102.")
@pytest.mark.xfail(strict=True, reason="Fails in current slither version. Fix in #1102.")
def test_phi_propagation_loop():
contract = """
pragma solidity ^0.8.11;
@ -395,7 +395,7 @@ def test_phi_propagation_loop():
verify_properties_hold(contract)
@pytest.mark.skip(reason="Fails in current slither version. Fix in #1102.")
@pytest.mark.xfail(strict=True, reason="Fails in current slither version. Fix in #1102.")
def test_free_function_properties():
contract = """
pragma solidity ^0.8.11;
@ -459,7 +459,7 @@ def test_ssa_inter_transactional():
assert assign2.lvalue in phi.rvalues
@pytest.mark.skip(reason="Fails in current slither version. Fix in #1102.")
@pytest.mark.xfail(strict=True, reason="Fails in current slither version. Fix in #1102.")
def test_ssa_phi_callbacks():
source = """
pragma solidity ^0.8.11;
@ -518,7 +518,7 @@ def test_ssa_phi_callbacks():
assert len(after_call_phi.rvalues) == 2
@pytest.mark.skip(reason="Fails in current slither version. Fix in #1102.")
@pytest.mark.xfail(strict=True, reason="Fails in current slither version. Fix in #1102.")
def test_storage_refers_to():
"""Test the storage aspects of the SSA IR
@ -585,7 +585,7 @@ def test_storage_refers_to():
assert phinodes[1].lvalue in entryphi[0].rvalues or entryphi[1].rvalues
@pytest.mark.skip(reason="Fails in current slither version. Fix in #1102.")
@pytest.mark.xfail(strict=True, reason="Fails in current slither version. Fix in #1102.")
@pytest.mark.skipif(
not valid_version("0.4.0"), reason="Solidity version 0.4.0 not available on this platform"
)
@ -622,7 +622,7 @@ def test_initial_version_exists_for_locals():
assert a_0.non_ssa_version == a_1.non_ssa_version
@pytest.mark.skip(reason="Fails in current slither version. Fix in #1102.")
@pytest.mark.xfail(strict=True, reason="Fails in current slither version. Fix in #1102.")
@pytest.mark.skipif(
not valid_version("0.4.0"), reason="Solidity version 0.4.0 not available on this platform"
)
@ -662,7 +662,7 @@ def test_initial_version_exists_for_state_variables():
assert len(get_ssa_of_type(f, Phi)) == 0
@pytest.mark.skip(reason="Fails in current slither version. Fix in #1102.")
@pytest.mark.xfail(strict=True, reason="Fails in current slither version. Fix in #1102.")
def test_initial_version_exists_for_state_variables_function_assign():
"""
In solidity you can write statements such as
@ -759,7 +759,7 @@ def test_shadow_local():
assert all(map(lambda x: x.lvalue.index == 1, get_ssa_of_type(f, Assignment)))
@pytest.mark.skip(reason="Fails in current slither version. Fix in #1102.")
@pytest.mark.xfail(strict=True, reason="Fails in current slither version. Fix in #1102.")
def test_multiple_named_args_returns():
"""Verifies that named arguments and return values have correct versions
@ -788,7 +788,7 @@ def test_multiple_named_args_returns():
)
@pytest.mark.xfail(reason="Tests for wanted state of SSA IR, not current.")
@pytest.mark.xfail(reason="Tests for wanted state of SSA IR, not current.", strict=True)
def test_memory_array():
src = """
contract MemArray {
@ -854,7 +854,7 @@ def test_memory_array():
assert len(phi_entry_b.rvalues) == len(b_args) + 1
@pytest.mark.xfail(reason="Tests for wanted state of SSA IR, not current.")
@pytest.mark.xfail(reason="Tests for wanted state of SSA IR, not current.", strict=True)
def test_storage_array():
src = """
contract StorageArray {
@ -909,7 +909,7 @@ def test_storage_array():
assert len(phi_entry_b.rvalues) == 3 # See comment in b above
@pytest.mark.skip(reason="Fails in current slither version. Fix in #1102.")
@pytest.mark.xfail(strict=True, reason="Fails in current slither version. Fix in #1102.")
def test_issue_468():
"""
Ensure issue 468 is corrected as per
@ -963,7 +963,7 @@ def test_issue_468():
assert phi_endif.lvalue in phi_entry.rvalues
@pytest.mark.skip(reason="Fails in current slither version. Fix in #1102.")
@pytest.mark.xfail(strict=True, reason="Fails in current slither version. Fix in #1102.")
def test_issue_434():
source = """
contract Contract {
@ -1017,7 +1017,7 @@ def test_issue_434():
assert aftercall_phi.lvalue in (add_f.variable_left, add_f.variable_right)
@pytest.mark.skip(reason="Fails in current slither version. Fix in #1102.")
@pytest.mark.xfail(strict=True, reason="Fails in current slither version. Fix in #1102.")
def test_issue_473():
source = """
contract Contract {

Loading…
Cancel
Save