@@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE(function_no_implementation)
47
47
function functionName(bytes32 input) public virtual returns (bytes32 out);
48
48
}
49
49
)" ;
50
- auto [sourceUnit, errors] = parseAnalyseAndReturnError (text);
50
+ auto [sourceUnit, errors] = runAnalysisAndExpectNoParsingErrors (text);
51
51
soltestAssert (sourceUnit);
52
52
soltestAssert (errors.empty (), " Unexpected error: " + formatErrors (errors));
53
53
@@ -64,7 +64,7 @@ BOOST_AUTO_TEST_CASE(abstract_contract)
64
64
abstract contract base { function foo() public virtual; }
65
65
contract derived is base { function foo() public override {} }
66
66
)" ;
67
- auto [sourceUnit, errors] = parseAnalyseAndReturnError (text);
67
+ auto [sourceUnit, errors] = runAnalysisAndExpectNoParsingErrors (text);
68
68
soltestAssert (sourceUnit);
69
69
soltestAssert (errors.empty (), " Unexpected error: " + formatErrors (errors));
70
70
@@ -85,7 +85,7 @@ BOOST_AUTO_TEST_CASE(abstract_contract_with_overload)
85
85
abstract contract base { function foo(bool) public virtual; }
86
86
abstract contract derived is base { function foo(uint) public {} }
87
87
)" ;
88
- auto [sourceUnit, errors] = parseAnalyseAndReturnError (text);
88
+ auto [sourceUnit, errors] = runAnalysisAndExpectNoParsingErrors (text);
89
89
soltestAssert (sourceUnit);
90
90
soltestAssert (errors.empty (), " Unexpected error: " + formatErrors (errors));
91
91
@@ -104,7 +104,7 @@ BOOST_AUTO_TEST_CASE(implement_abstract_via_constructor)
104
104
abstract contract base { function foo() public virtual; }
105
105
abstract contract foo is base { constructor() {} }
106
106
)" ;
107
- auto [sourceUnit, errors] = parseAnalyseAndReturnError (text);
107
+ auto [sourceUnit, errors] = runAnalysisAndExpectNoParsingErrors (text);
108
108
soltestAssert (sourceUnit);
109
109
soltestAssert (errors.empty (), " Unexpected error: " + formatErrors (errors));
110
110
@@ -124,7 +124,7 @@ BOOST_AUTO_TEST_CASE(function_canonical_signature)
124
124
}
125
125
}
126
126
)" ;
127
- auto [sourceUnit, errors] = parseAnalyseAndReturnError (text);
127
+ auto [sourceUnit, errors] = runAnalysisAndExpectNoParsingErrors (text);
128
128
soltestAssert (sourceUnit);
129
129
soltestAssert (errors.empty (), " Unexpected error: " + formatErrors (errors));
130
130
@@ -145,7 +145,7 @@ BOOST_AUTO_TEST_CASE(function_canonical_signature_type_aliases)
145
145
}
146
146
}
147
147
)" ;
148
- auto [sourceUnit, errors] = parseAnalyseAndReturnError (text);
148
+ auto [sourceUnit, errors] = runAnalysisAndExpectNoParsingErrors (text);
149
149
soltestAssert (sourceUnit);
150
150
soltestAssert (errors.empty (), " Unexpected error: " + formatErrors (errors));
151
151
@@ -171,7 +171,7 @@ BOOST_AUTO_TEST_CASE(function_external_types)
171
171
}
172
172
}
173
173
)" ;
174
- auto [sourceUnit, errors] = parseAnalyseAndReturnError (text);
174
+ auto [sourceUnit, errors] = runAnalysisAndExpectNoParsingErrors (text);
175
175
soltestAssert (sourceUnit);
176
176
soltestAssert (errors.empty (), " Unexpected error: " + formatErrors (errors));
177
177
@@ -196,7 +196,7 @@ BOOST_AUTO_TEST_CASE(enum_external_type)
196
196
}
197
197
}
198
198
)" ;
199
- auto [sourceUnit, errors] = parseAnalyseAndReturnError (text);
199
+ auto [sourceUnit, errors] = runAnalysisAndExpectNoParsingErrors (text);
200
200
soltestAssert (sourceUnit);
201
201
soltestAssert (errors.empty (), " Unexpected error: " + formatErrors (errors));
202
202
@@ -228,7 +228,7 @@ BOOST_AUTO_TEST_CASE(external_struct_signatures)
228
228
// Ignore analysis errors. This test only checks that correct signatures
229
229
// are generated for external structs, but they are not yet supported
230
230
// in code generation and therefore cause an error in the TypeChecker.
231
- SourceUnit const * sourceUnit = parseAnalyseAndReturnError (text, false , true , true ).first ;
231
+ SourceUnit const * sourceUnit = runAnalysisAndExpectNoParsingErrors (text, false , true , true ).first ;
232
232
for (ASTPointer<ASTNode> const & node: sourceUnit->nodes ())
233
233
if (ContractDefinition* contract = dynamic_cast <ContractDefinition*>(node.get ()))
234
234
{
@@ -259,7 +259,7 @@ BOOST_AUTO_TEST_CASE(external_struct_signatures_in_libraries)
259
259
// Ignore analysis errors. This test only checks that correct signatures
260
260
// are generated for external structs, but calldata structs are not yet supported
261
261
// in code generation and therefore cause an error in the TypeChecker.
262
- SourceUnit const * sourceUnit = parseAnalyseAndReturnError (text, false , true , true ).first ;
262
+ SourceUnit const * sourceUnit = runAnalysisAndExpectNoParsingErrors (text, false , true , true ).first ;
263
263
for (ASTPointer<ASTNode> const & node: sourceUnit->nodes ())
264
264
if (ContractDefinition* contract = dynamic_cast <ContractDefinition*>(node.get ()))
265
265
{
@@ -281,7 +281,7 @@ BOOST_AUTO_TEST_CASE(struct_with_mapping_in_library)
281
281
function f(X storage x) external {}
282
282
}
283
283
)" ;
284
- auto [sourceUnit, errors] = parseAnalyseAndReturnError (text);
284
+ auto [sourceUnit, errors] = runAnalysisAndExpectNoParsingErrors (text);
285
285
soltestAssert (sourceUnit);
286
286
soltestAssert (errors.empty (), " Unexpected error: " + formatErrors (errors));
287
287
@@ -307,7 +307,7 @@ BOOST_AUTO_TEST_CASE(state_variable_accessors)
307
307
}
308
308
)" ;
309
309
310
- auto [sourceUnit, errors] = parseAnalyseAndReturnError (text);
310
+ auto [sourceUnit, errors] = runAnalysisAndExpectNoParsingErrors (text);
311
311
soltestAssert (sourceUnit);
312
312
soltestAssert (errors.empty (), " Unexpected error: " + formatErrors (errors));
313
313
@@ -349,7 +349,7 @@ BOOST_AUTO_TEST_CASE(private_state_variable)
349
349
}
350
350
)" ;
351
351
352
- auto [sourceUnit, errors] = parseAnalyseAndReturnError (text);
352
+ auto [sourceUnit, errors] = runAnalysisAndExpectNoParsingErrors (text);
353
353
soltestAssert (sourceUnit);
354
354
soltestAssert (errors.empty (), " Unexpected error: " + formatErrors (errors));
355
355
@@ -397,7 +397,7 @@ BOOST_AUTO_TEST_CASE(warn_nonpresent_pragma)
397
397
// SPDX-License-Identifier: GPL-3.0
398
398
contract C {}
399
399
)" ;
400
- auto sourceAndError = parseAnalyseAndReturnError (text, true , false );
400
+ auto sourceAndError = runAnalysisAndExpectNoParsingErrors (text, true , false );
401
401
BOOST_REQUIRE (!sourceAndError.second .empty ());
402
402
BOOST_REQUIRE (!!sourceAndError.first );
403
403
BOOST_CHECK (searchErrorMessage (*sourceAndError.second .front (), " Source file does not specify required compiler version!" ));
0 commit comments