From d6bac5fd4a6d131c6d33ce45b63dce721710e490 Mon Sep 17 00:00:00 2001 From: Alexander Aprelev Date: Mon, 19 Mar 2018 08:29:56 -0700 Subject: [PATCH] Add const to list literal. (#15693) This is follow-up to https://github.com/flutter/flutter/pull/15537 to make dart1 coverage test happy. --- .../test/semantics/semantics_test.dart | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/flutter/test/semantics/semantics_test.dart b/packages/flutter/test/semantics/semantics_test.dart index 253dc08348..0f98d79ce5 100644 --- a/packages/flutter/test/semantics/semantics_test.dart +++ b/packages/flutter/test/semantics/semantics_test.dart @@ -145,14 +145,14 @@ void main() { test('OrdinalSortKey compares correctly', () { const List> tests = const >[ - [const OrdinalSortKey(0.0), const OrdinalSortKey(0.0)], - [const OrdinalSortKey(0.0), const OrdinalSortKey(1.0)], - [const OrdinalSortKey(1.0), const OrdinalSortKey(0.0)], - [const OrdinalSortKey(1.0), const OrdinalSortKey(1.0)], - [const OrdinalSortKey(0.0), const CustomSortKey(1.0)], - [const OrdinalSortKey(0.0), const CustomSortKey(0.0)], - [const CustomSortKey(0.0), const OrdinalSortKey(0.0)], - [const CustomSortKey(1.0), const OrdinalSortKey(0.0)], + const [const OrdinalSortKey(0.0), const OrdinalSortKey(0.0)], + const [const OrdinalSortKey(0.0), const OrdinalSortKey(1.0)], + const [const OrdinalSortKey(1.0), const OrdinalSortKey(0.0)], + const [const OrdinalSortKey(1.0), const OrdinalSortKey(1.0)], + const [const OrdinalSortKey(0.0), const CustomSortKey(1.0)], + const [const OrdinalSortKey(0.0), const CustomSortKey(0.0)], + const [const CustomSortKey(0.0), const OrdinalSortKey(0.0)], + const [const CustomSortKey(1.0), const OrdinalSortKey(0.0)], ]; final List expectedResults = [0, -1, 1, 0, 0, 0, 0, 0]; assert(tests.length == expectedResults.length); @@ -178,14 +178,14 @@ void main() { test('OrdinalSortKey compares correctly', () { const List> tests = const >[ - [const OrdinalSortKey(0.0), const OrdinalSortKey(0.0)], - [const OrdinalSortKey(0.0), const OrdinalSortKey(1.0)], - [const OrdinalSortKey(1.0), const OrdinalSortKey(0.0)], - [const OrdinalSortKey(1.0), const OrdinalSortKey(1.0)], - [const OrdinalSortKey(0.0), const CustomSortKey(1.0)], - [const OrdinalSortKey(0.0), const CustomSortKey(0.0)], - [const CustomSortKey(0.0), const OrdinalSortKey(0.0)], - [const CustomSortKey(1.0), const OrdinalSortKey(0.0)], + const [const OrdinalSortKey(0.0), const OrdinalSortKey(0.0)], + const [const OrdinalSortKey(0.0), const OrdinalSortKey(1.0)], + const [const OrdinalSortKey(1.0), const OrdinalSortKey(0.0)], + const [const OrdinalSortKey(1.0), const OrdinalSortKey(1.0)], + const [const OrdinalSortKey(0.0), const CustomSortKey(1.0)], + const [const OrdinalSortKey(0.0), const CustomSortKey(0.0)], + const [const CustomSortKey(0.0), const OrdinalSortKey(0.0)], + const [const CustomSortKey(1.0), const OrdinalSortKey(0.0)], ]; final List expectedResults = [0, -1, 1, 0, 0, 0, 0, 0]; assert(tests.length == expectedResults.length);