CompileContext.forTesting constructor
- @visibleForTesting
Creates a standalone CompileContext with pre-configured flags.
This is intended for use with overrideForTesting only:
// Generate null-safe code in these test cases.
CompileContext.overrideForTesting(CompileContext.forTesting(
emitNullSafeCode: true,
))
NOTE: reportAndRecover simply uses throw
in this configuration.
Implementation
@visibleForTesting
const factory CompileContext.forTesting({
bool isDevToolsEnabled,
bool validateMissingDirectives,
}) = _TestCompileContext;