@@ -44,30 +44,29 @@ void main() {
4444}
4545
4646void initTests (List <int > intSamples) {
47- testUint (intSamples, 8 , (l) => Uint8Buffer (l) );
48- testInt (intSamples, 8 , (l) => Int8Buffer (l) );
47+ testUint (intSamples, 8 , Uint8Buffer . new );
48+ testInt (intSamples, 8 , Int8Buffer . new );
4949 test ('Uint8ClampedBuffer' , () {
50- testIntBuffer (
51- intSamples, 8 , 0 , 255 , (l) => Uint8ClampedBuffer (l), clampUint8);
50+ testIntBuffer (intSamples, 8 , 0 , 255 , Uint8ClampedBuffer .new , clampUint8);
5251 });
53- testUint (intSamples, 16 , (l) => Uint16Buffer (l) );
54- testInt (intSamples, 16 , (l) => Int16Buffer (l) );
55- testUint (intSamples, 32 , (l) => Uint32Buffer (l) );
52+ testUint (intSamples, 16 , Uint16Buffer . new );
53+ testInt (intSamples, 16 , Int16Buffer . new );
54+ testUint (intSamples, 32 , Uint32Buffer . new );
5655
57- testInt (intSamples, 32 , (l) => Int32Buffer (l) );
56+ testInt (intSamples, 32 , Int32Buffer . new );
5857
59- testUint (intSamples, 64 , (l) => Uint64Buffer (l) ,
58+ testUint (intSamples, 64 , Uint64Buffer . new ,
6059 // JS doesn't support 64-bit ints, so only test this on the VM.
6160 testOn: 'dart-vm' );
62- testInt (intSamples, 64 , (l) => Int64Buffer (l) ,
61+ testInt (intSamples, 64 , Int64Buffer . new ,
6362 // JS doesn't support 64-bit ints, so only test this on the VM.
6463 testOn: 'dart-vm' );
6564
6665 testInt32x4Buffer (intSamples);
6766
6867 var roundedFloatSamples = floatSamples.map (roundToFloat).toList ();
69- testFloatBuffer (32 , roundedFloatSamples, () => Float32Buffer () , roundToFloat);
70- testFloatBuffer (64 , doubleSamples, () => Float64Buffer () , (x) => x);
68+ testFloatBuffer (32 , roundedFloatSamples, Float32Buffer . new , roundToFloat);
69+ testFloatBuffer (64 , doubleSamples, Float64Buffer . new , (x) => x);
7170
7271 testFloat32x4Buffer (roundedFloatSamples);
7372
@@ -557,7 +556,7 @@ class MatchesInt32x4 extends Matcher {
557556 description.add ('Int32x4.==' );
558557
559558 @override
560- bool matches (item, Map matchState) =>
559+ bool matches (Object ? item, Map matchState) =>
561560 item is Int32x4 &&
562561 result.x == item.x &&
563562 result.y == item.y &&
0 commit comments