Skip to content

Commit 1fd6b9d

Browse files
authored
Unit test path hotfix (#137)
* Path hotfix to be able use this package... * Fixing unit tests
1 parent 33af887 commit 1fd6b9d

17 files changed

+150
-167
lines changed

ast/sources_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,8 +427,8 @@ func getSourceTestCases(t *testing.T) []struct {
427427
EntrySourceUnitName: "SeaGod",
428428
LocalSourcesPath: buildFullPath("../sources/"),
429429
},
430-
expectedAst: tests.ReadJsonBytesForTest(t, "contracts/seagod/Seagod.solgo.ast").Content,
431-
expectedProto: tests.ReadJsonBytesForTest(t, "contracts/seagod/Seagod.solgo.ast.proto").Content,
430+
expectedAst: tests.ReadJsonBytesForTest(t, "contracts/seagod/SeaGod.solgo.ast").Content,
431+
expectedProto: tests.ReadJsonBytesForTest(t, "contracts/seagod/SeaGod.solgo.ast.proto").Content,
432432
unresolvedReferences: 0,
433433
expectsErrors: true,
434434
disabled: false,
@@ -467,8 +467,8 @@ func getSourceTestCases(t *testing.T) []struct {
467467
EntrySourceUnitName: "PTM",
468468
LocalSourcesPath: buildFullPath("../sources/"),
469469
},
470-
expectedAst: tests.ReadJsonBytesForTest(t, "contracts/ptm/Ptm.solgo.ast").Content,
471-
expectedProto: tests.ReadJsonBytesForTest(t, "contracts/ptm/Ptm.solgo.ast.proto").Content,
470+
expectedAst: tests.ReadJsonBytesForTest(t, "contracts/ptm/PTM.solgo.ast").Content,
471+
expectedProto: tests.ReadJsonBytesForTest(t, "contracts/ptm/PTM.solgo.ast.proto").Content,
472472
unresolvedReferences: 0,
473473
expectsErrors: false,
474474
disabled: false,

data/solc/releases/releases.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

data/tests/audits/ERC20.slither.raw.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

data/tests/audits/Lottery.slither.raw.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

data/tests/audits/SimpleStorage.slither.raw.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

data/tests/audits/TokenSale.slither.raw.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

data/tests/audits/TransparentUpgradeableProxy.slither.raw.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

data/tests/audits/VulnerableBank.slither.raw.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

data/tests/contracts/0x7C3a812bBfC759bf85097211253e63f9e5F49439/ItemsMarketplace.solgo.ast.json

Lines changed: 45 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -12707,10 +12707,10 @@
1270712707
},
1270812708
"member_name": "get",
1270912709
"argument_types": [],
12710-
"referenced_declaration": 526,
12710+
"referenced_declaration": 710,
1271112711
"type_description": {
12712-
"type_identifier": "t_contract$_IterableMapping_$1132",
12713-
"type_string": "contract IterableMapping"
12712+
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint128$",
12713+
"type_string": "function(struct IterableMapping.Map,uint128)"
1271412714
}
1271512715
},
1271612716
"type_description": {
@@ -15554,10 +15554,10 @@
1555415554
},
1555515555
"member_name": "remove",
1555615556
"argument_types": [],
15557-
"referenced_declaration": 1249,
15557+
"referenced_declaration": 767,
1555815558
"type_description": {
15559-
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint128$",
15560-
"type_string": "function(struct IterableMapping.Map,uint128)"
15559+
"type_identifier": "t_contract$_IterableMapping_$1132",
15560+
"type_string": "contract IterableMapping"
1556115561
}
1556215562
},
1556315563
"type_description": {
@@ -16137,10 +16137,10 @@
1613716137
},
1613816138
"member_name": "get",
1613916139
"argument_types": [],
16140-
"referenced_declaration": 526,
16140+
"referenced_declaration": 1171,
1614116141
"type_description": {
16142-
"type_identifier": "t_contract$_IterableMapping_$1132",
16143-
"type_string": "contract IterableMapping"
16142+
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint128$",
16143+
"type_string": "function(struct IterableMapping.Map,uint128)"
1614416144
}
1614516145
},
1614616146
"type_description": {
@@ -16852,10 +16852,10 @@
1685216852
},
1685316853
"member_name": "set",
1685416854
"argument_types": [],
16855-
"referenced_declaration": 1223,
16855+
"referenced_declaration": 739,
1685616856
"type_description": {
16857-
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint128$_t_struct$_IterableMapping_Order_$1141$",
16858-
"type_string": "function(struct IterableMapping.Map,uint128,struct IterableMapping.Order)"
16857+
"type_identifier": "t_contract$_IterableMapping_$1132",
16858+
"type_string": "contract IterableMapping"
1685916859
}
1686016860
},
1686116861
"type_description": {
@@ -17196,10 +17196,10 @@
1719617196
},
1719717197
"member_name": "get",
1719817198
"argument_types": [],
17199-
"referenced_declaration": 526,
17199+
"referenced_declaration": 551,
1720017200
"type_description": {
17201-
"type_identifier": "t_contract$_IterableMapping_$1132",
17202-
"type_string": "contract IterableMapping"
17201+
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint128$",
17202+
"type_string": "function(struct IterableMapping.Map,uint128)"
1720317203
}
1720417204
},
1720517205
"type_description": {
@@ -17492,8 +17492,8 @@
1749217492
"argument_types": [],
1749317493
"referenced_declaration": 680,
1749417494
"type_description": {
17495-
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint128$",
17496-
"type_string": "function(struct IterableMapping.Map,uint128)"
17495+
"type_identifier": "t_contract$_IterableMapping_$1132",
17496+
"type_string": "contract IterableMapping"
1749717497
}
1749817498
},
1749917499
"type_description": {
@@ -17712,8 +17712,8 @@
1771217712
"argument_types": [],
1771317713
"referenced_declaration": 680,
1771417714
"type_description": {
17715-
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint128$",
17716-
"type_string": "function(struct IterableMapping.Map,uint128)"
17715+
"type_identifier": "t_contract$_IterableMapping_$1132",
17716+
"type_string": "contract IterableMapping"
1771717717
}
1771817718
},
1771917719
"type_description": {
@@ -18361,10 +18361,10 @@
1836118361
},
1836218362
"member_name": "getKeyAtIndex",
1836318363
"argument_types": [],
18364-
"referenced_declaration": 1189,
18364+
"referenced_declaration": 864,
1836518365
"type_description": {
18366-
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint32$",
18367-
"type_string": "function(struct IterableMapping.Map,uint32)"
18366+
"type_identifier": "t_contract$_IterableMapping_$1132",
18367+
"type_string": "contract IterableMapping"
1836818368
}
1836918369
},
1837018370
"type_description": {
@@ -18857,7 +18857,7 @@
1885718857
},
1885818858
"member_name": "remove",
1885918859
"argument_types": [],
18860-
"referenced_declaration": 680,
18860+
"referenced_declaration": 1249,
1886118861
"type_description": {
1886218862
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint128$",
1886318863
"type_string": "function(struct IterableMapping.Map,uint128)"
@@ -19471,8 +19471,8 @@
1947119471
"argument_types": [],
1947219472
"referenced_declaration": 811,
1947319473
"type_description": {
19474-
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint32$",
19475-
"type_string": "function(struct IterableMapping.Map,uint32)"
19474+
"type_identifier": "t_contract$_IterableMapping_$1132",
19475+
"type_string": "contract IterableMapping"
1947619476
}
1947719477
},
1947819478
"type_description": {
@@ -19566,10 +19566,10 @@
1956619566
},
1956719567
"member_name": "remove",
1956819568
"argument_types": [],
19569-
"referenced_declaration": 680,
19569+
"referenced_declaration": 780,
1957019570
"type_description": {
19571-
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint128$",
19572-
"type_string": "function(struct IterableMapping.Map,uint128)"
19571+
"type_identifier": "t_contract$_IterableMapping_$1132",
19572+
"type_string": "contract IterableMapping"
1957319573
}
1957419574
},
1957519575
"type_description": {
@@ -19808,10 +19808,10 @@
1980819808
},
1980919809
"member_name": "size",
1981019810
"argument_types": [],
19811-
"referenced_declaration": 847,
19811+
"referenced_declaration": 794,
1981219812
"type_description": {
19813-
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$",
19814-
"type_string": "function(struct IterableMapping.Map)"
19813+
"type_identifier": "t_contract$_IterableMapping_$1132",
19814+
"type_string": "contract IterableMapping"
1981519815
}
1981619816
},
1981719817
"type_description": {
@@ -20428,7 +20428,7 @@
2042820428
},
2042920429
"member_name": "getKeyAtIndex",
2043020430
"argument_types": [],
20431-
"referenced_declaration": 811,
20431+
"referenced_declaration": 998,
2043220432
"type_description": {
2043320433
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint32$",
2043420434
"type_string": "function(struct IterableMapping.Map,uint32)"
@@ -20914,18 +20914,15 @@
2091420914
"is_pure": false
2091520915
},
2091620916
"type_descriptions": [
20917-
{
20918-
"type_identifier": "t_struct$_IterableMapping_Order_$1141",
20919-
"type_string": "struct IterableMapping.Order"
20920-
},
20917+
null,
2092120918
{
2092220919
"type_identifier": "t_uint32",
2092320920
"type_string": "uint32"
2092420921
}
2092520922
],
2092620923
"type_description": {
20927-
"type_identifier": "t_[_[$_t_struct$_IterableMapping_Order_$1141]$_t_uint32]$",
20928-
"type_string": "index[struct IterableMapping.Order:uint32]"
20924+
"type_identifier": "t_[_[$_t_unknown]$_t_uint32]$",
20925+
"type_string": "index[unknown:uint32]"
2092920926
}
2093020927
},
2093120928
"right_expression": {
@@ -21437,10 +21434,10 @@
2143721434
},
2143821435
"member_name": "size",
2143921436
"argument_types": [],
21440-
"referenced_declaration": 847,
21437+
"referenced_declaration": 794,
2144121438
"type_description": {
21442-
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$",
21443-
"type_string": "function(struct IterableMapping.Map)"
21439+
"type_identifier": "t_contract$_IterableMapping_$1132",
21440+
"type_string": "contract IterableMapping"
2144421441
}
2144521442
},
2144621443
"type_description": {
@@ -22057,7 +22054,7 @@
2205722054
},
2205822055
"member_name": "getKeyAtIndex",
2205922056
"argument_types": [],
22060-
"referenced_declaration": 811,
22057+
"referenced_declaration": 1189,
2206122058
"type_description": {
2206222059
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint32$",
2206322060
"type_string": "function(struct IterableMapping.Map,uint32)"
@@ -22235,10 +22232,10 @@
2223522232
},
2223622233
"member_name": "get",
2223722234
"argument_types": [],
22238-
"referenced_declaration": 526,
22235+
"referenced_declaration": 710,
2223922236
"type_description": {
22240-
"type_identifier": "t_contract$_IterableMapping_$1132",
22241-
"type_string": "contract IterableMapping"
22237+
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint128$",
22238+
"type_string": "function(struct IterableMapping.Map,uint128)"
2224222239
}
2224322240
},
2224422241
"type_description": {
@@ -23187,10 +23184,10 @@
2318723184
},
2318823185
"member_name": "get",
2318923186
"argument_types": [],
23190-
"referenced_declaration": 526,
23187+
"referenced_declaration": 551,
2319123188
"type_description": {
23192-
"type_identifier": "t_contract$_IterableMapping_$1132",
23193-
"type_string": "contract IterableMapping"
23189+
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$1155$_t_uint128$",
23190+
"type_string": "function(struct IterableMapping.Map,uint128)"
2319423191
}
2319523192
},
2319623193
"type_description": {

0 commit comments

Comments
 (0)