From d5335340f4f41bc0c026f49c69e3dc53c37d6943 Mon Sep 17 00:00:00 2001 From: Stephen Adams Date: Mon, 11 Jan 2021 17:42:06 +0000 Subject: [PATCH] [benchmark] BigIntParsePrint: fix lints Change-Id: Id0b131e9127b4b57bf88d376cb17d3b3676dfa6d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177740 Reviewed-by: Jonas Termansen Commit-Queue: Stephen Adams --- benchmarks/BigIntParsePrint/dart/BigIntParsePrint.dart | 10 +++++----- .../BigIntParsePrint/dart2/BigIntParsePrint.dart | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/benchmarks/BigIntParsePrint/dart/BigIntParsePrint.dart b/benchmarks/BigIntParsePrint/dart/BigIntParsePrint.dart index 7f4c3c9fc0c..b3d40c07448 100644 --- a/benchmarks/BigIntParsePrint/dart/BigIntParsePrint.dart +++ b/benchmarks/BigIntParsePrint/dart/BigIntParsePrint.dart @@ -33,13 +33,13 @@ const requiredDigits = 11106; class Benchmark extends BenchmarkBase { final List strings; - Benchmark(String name, int bits, {bool forInt: false}) + Benchmark(String name, int bits, {bool forInt = false}) : strings = generateStrings(bits, forInt), super(name); static List generateStrings(int bits, bool forInt) { - List strings = []; - BigInt seed = (BigInt.one << bits) - BigInt.one; + final List strings = []; + final BigInt seed = (BigInt.one << bits) - BigInt.one; var b = seed; var restartDelta = BigInt.zero; var totalLength = 0; @@ -130,7 +130,7 @@ class FormatBigIntBenchmark extends Benchmark { @override void setup() { for (String s in strings) { - BigInt b = BigInt.parse(s); + final BigInt b = BigInt.parse(s); values.add(b - BigInt.one); // We add 'one' back later. } } @@ -158,7 +158,7 @@ class FormatIntBenchmark extends Benchmark { @override void setup() { for (String s in strings) { - int b = int.parse(s); + final int b = int.parse(s); values.add(b - 4096); // We add this back later. } } diff --git a/benchmarks/BigIntParsePrint/dart2/BigIntParsePrint.dart b/benchmarks/BigIntParsePrint/dart2/BigIntParsePrint.dart index 700c4089a31..db19b68808f 100644 --- a/benchmarks/BigIntParsePrint/dart2/BigIntParsePrint.dart +++ b/benchmarks/BigIntParsePrint/dart2/BigIntParsePrint.dart @@ -35,13 +35,13 @@ const requiredDigits = 11106; class Benchmark extends BenchmarkBase { final List strings; - Benchmark(String name, int bits, {bool forInt: false}) + Benchmark(String name, int bits, {bool forInt = false}) : strings = generateStrings(bits, forInt), super(name); static List generateStrings(int bits, bool forInt) { - List strings = []; - BigInt seed = (BigInt.one << bits) - BigInt.one; + final List strings = []; + final BigInt seed = (BigInt.one << bits) - BigInt.one; var b = seed; var restartDelta = BigInt.zero; var totalLength = 0; @@ -132,7 +132,7 @@ class FormatBigIntBenchmark extends Benchmark { @override void setup() { for (String s in strings) { - BigInt b = BigInt.parse(s); + final BigInt b = BigInt.parse(s); values.add(b - BigInt.one); // We add 'one' back later. } } @@ -160,7 +160,7 @@ class FormatIntBenchmark extends Benchmark { @override void setup() { for (String s in strings) { - int b = int.parse(s); + final int b = int.parse(s); values.add(b - 4096); // We add this back later. } }