diff --git a/benchmark/lib/dashboard.dart b/benchmark/lib/dashboard.dart index 1061d5302..dda133f94 100644 --- a/benchmark/lib/dashboard.dart +++ b/benchmark/lib/dashboard.dart @@ -13,7 +13,7 @@ import 'generated/benchmark.pb.dart' as pb; import 'benchmark.dart' show Profiler; import 'dashboard_model.dart' show DashboardModel, Table, SelectEvent; import 'dashboard_view.dart' show DashboardView; -import 'report.dart' show createPlatform, createPackages, encodeReport; +import 'report.dart' show createPlatform, createPackages; import 'suite.dart' show runSuite; import '../data/index.dart' as data; diff --git a/benchmark/lib/suites/json.dart b/benchmark/lib/suites/json.dart index cb2b08715..17fd37a8f 100644 --- a/benchmark/lib/suites/json.dart +++ b/benchmark/lib/suites/json.dart @@ -10,7 +10,7 @@ import '../benchmarks/int64_json.dart'; import '../benchmarks/repeated_int64_json.dart'; import '../benchmarks/string_json.dart'; import '../benchmarks/repeated_string_json.dart'; -import '../generated/benchmark.pb.dart' show Request, Suite; +import '../generated/benchmark.pb.dart' show Suite; final jsonSuite = () { var suite = new Suite(); diff --git a/benchmark/lib/suites/props.dart b/benchmark/lib/suites/props.dart index 305a9cdea..8e37339ef 100644 --- a/benchmark/lib/suites/props.dart +++ b/benchmark/lib/suites/props.dart @@ -7,7 +7,7 @@ library protoc.benchmark.suite.json; import '../benchmarks/get_strings.dart'; import '../benchmarks/set_strings.dart'; import '../benchmarks/has_strings.dart'; -import '../generated/benchmark.pb.dart' show Request, Suite; +import '../generated/benchmark.pb.dart' show Suite; final propsSuite = () { var suite = new Suite(); diff --git a/test/map_test.dart b/test/map_test.dart index 058ba07e4..4dd07414f 100644 --- a/test/map_test.dart +++ b/test/map_test.dart @@ -1,24 +1,22 @@ library map_test; import 'package:test/test.dart' - show test, expect, predicate, same, throwsA, - throwsArgumentError, throwsUnsupportedError; + show test, expect, predicate, same, throwsA, throwsArgumentError; import '../out/protos/map_api.pb.dart' as pb; import '../out/protos/map_api2.pb.dart' as pb2; throwsError(Type expectedType, String expectedMessage) => - throwsA(predicate((x) { - expect(x.runtimeType, expectedType); - expect(x.message, expectedMessage); - return true; - })); + throwsA(predicate((x) { + expect(x.runtimeType, expectedType); + expect(x.message, expectedMessage); + return true; + })); void main() { - test("message doesn't implement Map when turned off", () { - expect(new pb.NonMap(), predicate((x) => x is !Map)); - expect(new pb2.NonMap2(), predicate((x) => x is !Map)); + expect(new pb.NonMap(), predicate((x) => x is! Map)); + expect(new pb2.NonMap2(), predicate((x) => x is! Map)); }); test("message implements Map when turned on", () { @@ -56,20 +54,27 @@ void main() { test('operator []= throws exception for invalid key', () { var rec = new pb.Rec(); - expect(() { rec["unknown"] = 123; }, - throwsError(ArgumentError, "field 'unknown' not found in Rec")); + expect(() { + rec["unknown"] = 123; + }, throwsError(ArgumentError, "field 'unknown' not found in Rec")); }); test('operator []= throws exception for repeated field', () { // Copying the values would be confusing. var rec = new pb.Rec(); - expect(() { rec["nums"] = [1, 2]; }, throwsArgumentError); + expect(() { + rec["nums"] = [1, 2]; + }, throwsArgumentError); }); test('operator []= throws exception for invalid value type', () { var rec = new pb.Rec(); - expect(() { rec["num"] = "hello"; }, throwsArgumentError); - expect(() { rec["str"] = 123; }, throwsArgumentError); + expect(() { + rec["num"] = "hello"; + }, throwsArgumentError); + expect(() { + rec["str"] = 123; + }, throwsArgumentError); }); test('operator []= sets the field', () { @@ -104,8 +109,9 @@ void main() { test("remove isn't supported", () { var rec = new pb.Rec(); rec.str = "hello"; - expect(() { rec.remove("str"); }, - throwsError(UnsupportedError, "remove() not supported by Rec")); + expect(() { + rec.remove("str"); + }, throwsError(UnsupportedError, "remove() not supported by Rec")); expect(rec.str, "hello"); }); @@ -132,6 +138,10 @@ void main() { test("addAll doesn't work for repeated fields", () { // It would be confusing to copy the values. var rec = new pb.Rec(); - expect(() { rec.addAll({"nums": [1,2,3]}); }, throwsArgumentError); + expect(() { + rec.addAll({ + "nums": [1, 2, 3] + }); + }, throwsArgumentError); }); }