Skip to content

Commit 09b93b7

Browse files
mralephcommit-bot@chromium.org
authored andcommitted
[fasta] Tweak fasta unit tests setup in anticipation of constant update 2018
- Pass empty environment defines into CompilerOptions - to ensure that there are no unevaluated constants in the output. VM does not expect those. - Include constant table when comparing expectations Change-Id: I276e8bf8ce1f4f39c63265e4ae2650953649e41f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108800 Auto-Submit: Vyacheslav Egorov <[email protected]> Commit-Queue: Johnni Winther <[email protected]> Reviewed-by: Johnni Winther <[email protected]>
1 parent 3c3dc09 commit 09b93b7

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

pkg/front_end/lib/src/fasta/testing/kernel_chain.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ class MatchExpectation extends Step<Component, Component, MatchContext> {
230230
printer.writeLibraryFile(library);
231231
printer.endLine();
232232
});
233+
printer.writeConstantTable(component);
233234
String actual = "$buffer";
234235
String binariesPath = relativizeUri(platformBinariesLocation);
235236
if (binariesPath.endsWith("/dart-sdk/lib/_internal/")) {

pkg/front_end/test/fasta/testing/suite.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ class FastaContext extends ChainContext with MatchContext {
262262
}
263263
..sdkRoot = sdk
264264
..packagesFileUri = packages
265+
..environmentDefines = {}
265266
..experimentalFlags = <ExperimentalFlag, bool>{
266267
ExperimentalFlag.controlFlowCollections:
267268
enableControlFlowCollections,
@@ -353,6 +354,7 @@ class Outline extends Step<TestDescription, Component, FastaContext> {
353354
}
354355
errors.writeAll(message.plainTextFormatted, "\n");
355356
}
357+
..environmentDefines = {}
356358
..experimentalFlags = <ExperimentalFlag, bool>{
357359
ExperimentalFlag.controlFlowCollections:
358360
context.enableControlFlowCollections,

0 commit comments

Comments
 (0)