Include utility functions in ExpressionCompiler tests

This commit is contained in:
Alex Beregszaszi 2021-05-26 21:59:47 +01:00
parent c436785686
commit cc8d341e28

View File

@ -162,6 +162,12 @@ bytes compileFirstExpression(
context << context.functionEntryLabel(dynamic_cast<FunctionDefinition const&>(
resolveDeclaration(*sourceUnit, function, resolver)
));
context.appendMissingLowLevelFunctions();
// NOTE: We intentionally disable optimisations for utility functions to simplfy the tests
context.appendYulUtilityFunctions({});
BOOST_REQUIRE(context.appendYulUtilityFunctionsRan());
BOOST_REQUIRE(context.assemblyPtr());
LinkerObject const& object = context.assemblyPtr()->assemble();
BOOST_REQUIRE(object.immutableReferences.empty());