diff --git a/pkg/analyzer/test/generated/constant_test.dart b/pkg/analyzer/test/generated/constant_test.dart index f350ad79d08c..011474830222 100644 --- a/pkg/analyzer/test/generated/constant_test.dart +++ b/pkg/analyzer/test/generated/constant_test.dart @@ -5,6 +5,7 @@ @deprecated library analyzer.test.constant_test; +import 'package:analyzer/src/dart/analysis/experiments.dart'; import 'package:analyzer/src/dart/element/element.dart'; import 'package:analyzer/src/generated/constant.dart'; import 'package:test/test.dart'; @@ -20,6 +21,18 @@ main() { @reflectiveTest class ConstantEvaluatorTest extends PubPackageResolutionTest { + @override + void setUp() { + super.setUp(); + writeTestPackageAnalysisOptionsFile( + AnalysisOptionsFileConfig( + experiments: [ + EnableString.triple_shift, + ], + ), + ); + } + test_bitAnd_int_int() async { await _assertValueInt(74 & 42, "74 & 42"); } @@ -446,6 +459,10 @@ const [for (var i = 0; i < 4; i++) i] await _assertValueInt(6, "2 * 3"); } + test_tripleShift() async { + await _assertValueInt(16, "64 >>> 2"); + } + test_truncatingDivide_double_double() async { await _assertValueInt(1, "3.2 ~/ 2.3"); }