Skip to content

Commit

Permalink
Unit test path hotfix (#137)
Browse files Browse the repository at this point in the history
* Path hotfix to be able use this package...
* Fixing unit tests
  • Loading branch information
0x19 authored Nov 14, 2023
1 parent 33af887 commit 1fd6b9d
Show file tree
Hide file tree
Showing 17 changed files with 150 additions and 167 deletions.
8 changes: 4 additions & 4 deletions ast/sources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,8 @@ func getSourceTestCases(t *testing.T) []struct {
EntrySourceUnitName: "SeaGod",
LocalSourcesPath: buildFullPath("../sources/"),
},
expectedAst: tests.ReadJsonBytesForTest(t, "contracts/seagod/Seagod.solgo.ast").Content,
expectedProto: tests.ReadJsonBytesForTest(t, "contracts/seagod/Seagod.solgo.ast.proto").Content,
expectedAst: tests.ReadJsonBytesForTest(t, "contracts/seagod/SeaGod.solgo.ast").Content,
expectedProto: tests.ReadJsonBytesForTest(t, "contracts/seagod/SeaGod.solgo.ast.proto").Content,
unresolvedReferences: 0,
expectsErrors: true,
disabled: false,
Expand Down Expand Up @@ -467,8 +467,8 @@ func getSourceTestCases(t *testing.T) []struct {
EntrySourceUnitName: "PTM",
LocalSourcesPath: buildFullPath("../sources/"),
},
expectedAst: tests.ReadJsonBytesForTest(t, "contracts/ptm/Ptm.solgo.ast").Content,
expectedProto: tests.ReadJsonBytesForTest(t, "contracts/ptm/Ptm.solgo.ast.proto").Content,
expectedAst: tests.ReadJsonBytesForTest(t, "contracts/ptm/PTM.solgo.ast").Content,
expectedProto: tests.ReadJsonBytesForTest(t, "contracts/ptm/PTM.solgo.ast.proto").Content,
unresolvedReferences: 0,
expectsErrors: false,
disabled: false,
Expand Down
2 changes: 1 addition & 1 deletion data/solc/releases/releases.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/tests/audits/ERC20.slither.raw.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/tests/audits/Lottery.slither.raw.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/tests/audits/SimpleStorage.slither.raw.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/tests/audits/TokenSale.slither.raw.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/tests/audits/VulnerableBank.slither.raw.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12707,10 +12707,10 @@
},
"member_name": "get",
"argument_types": [],
"referenced_declaration": 526,
"referenced_declaration": 710,
"type_description": {
"type_identifier": "t_contract$_IterableMapping_$1132",
"type_string": "contract IterableMapping"
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint128$",
"type_string": "function(struct IterableMapping.Map,uint128)"
}
},
"type_description": {
Expand Down Expand Up @@ -15554,10 +15554,10 @@
},
"member_name": "remove",
"argument_types": [],
"referenced_declaration": 1249,
"referenced_declaration": 767,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint128$",
"type_string": "function(struct IterableMapping.Map,uint128)"
"type_identifier": "t_contract$_IterableMapping_$1132",
"type_string": "contract IterableMapping"
}
},
"type_description": {
Expand Down Expand Up @@ -16137,10 +16137,10 @@
},
"member_name": "get",
"argument_types": [],
"referenced_declaration": 526,
"referenced_declaration": 1171,
"type_description": {
"type_identifier": "t_contract$_IterableMapping_$1132",
"type_string": "contract IterableMapping"
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint128$",
"type_string": "function(struct IterableMapping.Map,uint128)"
}
},
"type_description": {
Expand Down Expand Up @@ -16852,10 +16852,10 @@
},
"member_name": "set",
"argument_types": [],
"referenced_declaration": 1223,
"referenced_declaration": 739,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint128$_t_struct$_IterableMapping_Order_$1141$",
"type_string": "function(struct IterableMapping.Map,uint128,struct IterableMapping.Order)"
"type_identifier": "t_contract$_IterableMapping_$1132",
"type_string": "contract IterableMapping"
}
},
"type_description": {
Expand Down Expand Up @@ -17196,10 +17196,10 @@
},
"member_name": "get",
"argument_types": [],
"referenced_declaration": 526,
"referenced_declaration": 551,
"type_description": {
"type_identifier": "t_contract$_IterableMapping_$1132",
"type_string": "contract IterableMapping"
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint128$",
"type_string": "function(struct IterableMapping.Map,uint128)"
}
},
"type_description": {
Expand Down Expand Up @@ -17492,8 +17492,8 @@
"argument_types": [],
"referenced_declaration": 680,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint128$",
"type_string": "function(struct IterableMapping.Map,uint128)"
"type_identifier": "t_contract$_IterableMapping_$1132",
"type_string": "contract IterableMapping"
}
},
"type_description": {
Expand Down Expand Up @@ -17712,8 +17712,8 @@
"argument_types": [],
"referenced_declaration": 680,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint128$",
"type_string": "function(struct IterableMapping.Map,uint128)"
"type_identifier": "t_contract$_IterableMapping_$1132",
"type_string": "contract IterableMapping"
}
},
"type_description": {
Expand Down Expand Up @@ -18361,10 +18361,10 @@
},
"member_name": "getKeyAtIndex",
"argument_types": [],
"referenced_declaration": 1189,
"referenced_declaration": 864,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint32$",
"type_string": "function(struct IterableMapping.Map,uint32)"
"type_identifier": "t_contract$_IterableMapping_$1132",
"type_string": "contract IterableMapping"
}
},
"type_description": {
Expand Down Expand Up @@ -18857,7 +18857,7 @@
},
"member_name": "remove",
"argument_types": [],
"referenced_declaration": 680,
"referenced_declaration": 1249,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint128$",
"type_string": "function(struct IterableMapping.Map,uint128)"
Expand Down Expand Up @@ -19471,8 +19471,8 @@
"argument_types": [],
"referenced_declaration": 811,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint32$",
"type_string": "function(struct IterableMapping.Map,uint32)"
"type_identifier": "t_contract$_IterableMapping_$1132",
"type_string": "contract IterableMapping"
}
},
"type_description": {
Expand Down Expand Up @@ -19566,10 +19566,10 @@
},
"member_name": "remove",
"argument_types": [],
"referenced_declaration": 680,
"referenced_declaration": 780,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint128$",
"type_string": "function(struct IterableMapping.Map,uint128)"
"type_identifier": "t_contract$_IterableMapping_$1132",
"type_string": "contract IterableMapping"
}
},
"type_description": {
Expand Down Expand Up @@ -19808,10 +19808,10 @@
},
"member_name": "size",
"argument_types": [],
"referenced_declaration": 847,
"referenced_declaration": 794,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$",
"type_string": "function(struct IterableMapping.Map)"
"type_identifier": "t_contract$_IterableMapping_$1132",
"type_string": "contract IterableMapping"
}
},
"type_description": {
Expand Down Expand Up @@ -20428,7 +20428,7 @@
},
"member_name": "getKeyAtIndex",
"argument_types": [],
"referenced_declaration": 811,
"referenced_declaration": 998,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint32$",
"type_string": "function(struct IterableMapping.Map,uint32)"
Expand Down Expand Up @@ -20914,18 +20914,15 @@
"is_pure": false
},
"type_descriptions": [
{
"type_identifier": "t_struct$_IterableMapping_Order_$1141",
"type_string": "struct IterableMapping.Order"
},
null,
{
"type_identifier": "t_uint32",
"type_string": "uint32"
}
],
"type_description": {
"type_identifier": "t_[_[$_t_struct$_IterableMapping_Order_$1141]$_t_uint32]$",
"type_string": "index[struct IterableMapping.Order:uint32]"
"type_identifier": "t_[_[$_t_unknown]$_t_uint32]$",
"type_string": "index[unknown:uint32]"
}
},
"right_expression": {
Expand Down Expand Up @@ -21437,10 +21434,10 @@
},
"member_name": "size",
"argument_types": [],
"referenced_declaration": 847,
"referenced_declaration": 794,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$",
"type_string": "function(struct IterableMapping.Map)"
"type_identifier": "t_contract$_IterableMapping_$1132",
"type_string": "contract IterableMapping"
}
},
"type_description": {
Expand Down Expand Up @@ -22057,7 +22054,7 @@
},
"member_name": "getKeyAtIndex",
"argument_types": [],
"referenced_declaration": 811,
"referenced_declaration": 1189,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint32$",
"type_string": "function(struct IterableMapping.Map,uint32)"
Expand Down Expand Up @@ -22235,10 +22232,10 @@
},
"member_name": "get",
"argument_types": [],
"referenced_declaration": 526,
"referenced_declaration": 710,
"type_description": {
"type_identifier": "t_contract$_IterableMapping_$1132",
"type_string": "contract IterableMapping"
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint128$",
"type_string": "function(struct IterableMapping.Map,uint128)"
}
},
"type_description": {
Expand Down Expand Up @@ -23187,10 +23184,10 @@
},
"member_name": "get",
"argument_types": [],
"referenced_declaration": 526,
"referenced_declaration": 551,
"type_description": {
"type_identifier": "t_contract$_IterableMapping_$1132",
"type_string": "contract IterableMapping"
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint128$",
"type_string": "function(struct IterableMapping.Map,uint128)"
}
},
"type_description": {
Expand Down
Loading

0 comments on commit 1fd6b9d

Please sign in to comment.