From cc8d341e285d748f6e60e28d45458e80802ea773 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 26 May 2021 21:59:47 +0100 Subject: [PATCH] Include utility functions in ExpressionCompiler tests --- test/libsolidity/SolidityExpressionCompiler.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/libsolidity/SolidityExpressionCompiler.cpp b/test/libsolidity/SolidityExpressionCompiler.cpp index 2574cee9c..27804369a 100644 --- a/test/libsolidity/SolidityExpressionCompiler.cpp +++ b/test/libsolidity/SolidityExpressionCompiler.cpp @@ -162,6 +162,12 @@ bytes compileFirstExpression( context << context.functionEntryLabel(dynamic_cast( 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());