Exemple #1
0
def test_reads_vat_can_correctly():
    variable_descriptions = transform(input_data)

    can = variable_descriptions[1]
    assert can["name"] == expected_output_data[1]["name"]
    assert can["slot"] == expected_output_data[1]["slot"]
    assert can["start"] == expected_output_data[1]["start"]
    assert can["type"] == expected_output_data[1]["type"]
    assert can["hashmap"] == expected_output_data[1]["hashmap"]
Exemple #2
0
def test_reads_vat_wards_correctly():
    variable_descriptions = transform(input_data)

    wards = variable_descriptions[0]
    assert wards["name"] == expected_output_data[0]["name"]
    assert wards["slot"] == expected_output_data[0]["slot"]
    assert wards["start"] == expected_output_data[0]["start"]
    assert wards["type"] == expected_output_data[0]["type"]
    assert wards["hashmap"] == expected_output_data[0]["hashmap"]
Exemple #3
0
def test_reads_vat_ilks_correctly():
    variable_descriptions = transform(input_data)

    ilks = variable_descriptions[2]
    assert ilks["name"] == expected_output_data[2]["name"]
    assert ilks["slot"] == expected_output_data[2]["slot"]
    assert ilks["start"] == expected_output_data[2]["start"]
    assert ilks["end"] == expected_output_data[2]["end"]
    assert ilks["type"] == expected_output_data[2]["type"]
    assert ilks["hashmap"] == expected_output_data[2]["hashmap"]
Exemple #4
0
def test_reads_vat_live_correctly():
    variable_descriptions = transform(input_data)

    live = variable_descriptions[10]
    assert live["name"] == expected_output_data[10]["name"]
    assert live["slot"] == expected_output_data[10]["slot"]
    assert live["start"] == expected_output_data[10]["start"]
    assert live["end"] == expected_output_data[10]["end"]
    assert live["type"] == expected_output_data[10]["type"]
    assert live["hashmap"] == expected_output_data[10]["hashmap"]
Exemple #5
0
def test_reads_vat_debt_correctly():
    variable_descriptions = transform(input_data)

    debt = variable_descriptions[7]
    assert debt["name"] == expected_output_data[7]["name"]
    assert debt["slot"] == expected_output_data[7]["slot"]
    assert debt["start"] == expected_output_data[7]["start"]
    assert debt["end"] == expected_output_data[7]["end"]
    assert debt["type"] == expected_output_data[7]["type"]
    assert debt["hashmap"] == expected_output_data[7]["hashmap"]
Exemple #6
0
def test_reads_vat_sin_correctly():
    variable_descriptions = transform(input_data)

    sin = variable_descriptions[6]
    assert sin["name"] == expected_output_data[6]["name"]
    assert sin["slot"] == expected_output_data[6]["slot"]
    assert sin["start"] == expected_output_data[6]["start"]
    assert sin["end"] == expected_output_data[6]["end"]
    assert sin["type"] == expected_output_data[6]["type"]
    assert sin["hashmap"] == expected_output_data[6]["hashmap"]
Exemple #7
0
def test_reads_vat_gem_correctly():
    variable_descriptions = transform(input_data)

    gem = variable_descriptions[4]
    assert gem["name"] == expected_output_data[4]["name"]
    assert gem["slot"] == expected_output_data[4]["slot"]
    assert gem["start"] == expected_output_data[4]["start"]
    assert gem["end"] == expected_output_data[4]["end"]
    assert gem["type"] == expected_output_data[4]["type"]
    assert gem["hashmap"] == expected_output_data[4]["hashmap"]
Exemple #8
0
def test_transforms_vat_contract_storage_description():
    variable_descriptions = transform(input_data)

    assert len(variable_descriptions) == len(expected_output_data)