From 04887ea21e16167e65e95e679fc47743c421bb80 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Wed, 2 May 2018 14:38:57 -0700 Subject: [PATCH 1/2] Fix runtime Dart 2 test errors --- test/typed_buffers_test.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/typed_buffers_test.dart b/test/typed_buffers_test.dart index 35aab01..13e91af 100644 --- a/test/typed_buffers_test.dart +++ b/test/typed_buffers_test.dart @@ -30,7 +30,7 @@ main() { testInt32x4Buffer(intSamples); - List roundedFloatSamples = floatSamples.map(roundToFloat).toList(); + var roundedFloatSamples = floatSamples.map(roundToFloat).toList(); testFloatBuffer( 32, roundedFloatSamples, () => new Float32Buffer(), roundToFloat); testFloatBuffer(64, doubleSamples, () => new Float64Buffer(), (x) => x); @@ -147,7 +147,7 @@ main() { }); } -const List doubleSamples = const [ +const doubleSamples = const [ 0.0, 5e-324, // Minimal denormal value. 2.225073858507201e-308, // Maximal denormal value. @@ -308,7 +308,7 @@ testFloat32x4Buffer(List floatSamples) { // Takes bit-size, min value, max value, function to create a buffer, and // the rounding that is applied when storing values outside the valid range // into the buffer. -testFloatBuffer(int bitSize, List samples, create(), double round(double v)) { +void testFloatBuffer(int bitSize, List samples, create(), double round(double v)) { test("Float${bitSize}Buffer", () { var buffer = create(); expect(buffer, new isInstanceOf>()); From 1b06502e6b388a775c45df29c0d6dc1a4748e734 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Wed, 2 May 2018 14:51:20 -0700 Subject: [PATCH 2/2] Format --- test/typed_buffers_test.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/typed_buffers_test.dart b/test/typed_buffers_test.dart index 13e91af..53aa666 100644 --- a/test/typed_buffers_test.dart +++ b/test/typed_buffers_test.dart @@ -308,7 +308,8 @@ testFloat32x4Buffer(List floatSamples) { // Takes bit-size, min value, max value, function to create a buffer, and // the rounding that is applied when storing values outside the valid range // into the buffer. -void testFloatBuffer(int bitSize, List samples, create(), double round(double v)) { +void testFloatBuffer( + int bitSize, List samples, create(), double round(double v)) { test("Float${bitSize}Buffer", () { var buffer = create(); expect(buffer, new isInstanceOf>());