File tree 1 file changed +17
-0
lines changed
pkg/analyzer/test/generated
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 5
5
@deprecated
6
6
library analyzer.test.constant_test;
7
7
8
+ import 'package:analyzer/src/dart/analysis/experiments.dart' ;
8
9
import 'package:analyzer/src/dart/element/element.dart' ;
9
10
import 'package:analyzer/src/generated/constant.dart' ;
10
11
import 'package:test/test.dart' ;
@@ -20,6 +21,18 @@ main() {
20
21
21
22
@reflectiveTest
22
23
class ConstantEvaluatorTest extends PubPackageResolutionTest {
24
+ @override
25
+ void setUp () {
26
+ super .setUp ();
27
+ writeTestPackageAnalysisOptionsFile (
28
+ AnalysisOptionsFileConfig (
29
+ experiments: [
30
+ EnableString .triple_shift,
31
+ ],
32
+ ),
33
+ );
34
+ }
35
+
23
36
test_bitAnd_int_int () async {
24
37
await _assertValueInt (74 & 42 , "74 & 42" );
25
38
}
@@ -446,6 +459,10 @@ const [for (var i = 0; i < 4; i++) i]
446
459
await _assertValueInt (6 , "2 * 3" );
447
460
}
448
461
462
+ test_tripleShift () async {
463
+ await _assertValueInt (16 , "64 >>> 2" );
464
+ }
465
+
449
466
test_truncatingDivide_double_double () async {
450
467
await _assertValueInt (1 , "3.2 ~/ 2.3" );
451
468
}
You can’t perform that action at this time.
0 commit comments