Unverified Commit d6bac5fd authored by Alexander Aprelev's avatar Alexander Aprelev Committed by GitHub

Add const to list literal. (#15693)

This is follow-up to https://github.com/flutter/flutter/pull/15537 to make dart1 coverage test happy.
parent 9c49255f
......@@ -145,14 +145,14 @@ void main() {
test('OrdinalSortKey compares correctly', () {
const List<List<SemanticsSortKey>> tests = const <List<SemanticsSortKey>>[
<SemanticsSortKey>[const OrdinalSortKey(0.0), const OrdinalSortKey(0.0)],
<SemanticsSortKey>[const OrdinalSortKey(0.0), const OrdinalSortKey(1.0)],
<SemanticsSortKey>[const OrdinalSortKey(1.0), const OrdinalSortKey(0.0)],
<SemanticsSortKey>[const OrdinalSortKey(1.0), const OrdinalSortKey(1.0)],
<SemanticsSortKey>[const OrdinalSortKey(0.0), const CustomSortKey(1.0)],
<SemanticsSortKey>[const OrdinalSortKey(0.0), const CustomSortKey(0.0)],
<SemanticsSortKey>[const CustomSortKey(0.0), const OrdinalSortKey(0.0)],
<SemanticsSortKey>[const CustomSortKey(1.0), const OrdinalSortKey(0.0)],
const <SemanticsSortKey>[const OrdinalSortKey(0.0), const OrdinalSortKey(0.0)],
const <SemanticsSortKey>[const OrdinalSortKey(0.0), const OrdinalSortKey(1.0)],
const <SemanticsSortKey>[const OrdinalSortKey(1.0), const OrdinalSortKey(0.0)],
const <SemanticsSortKey>[const OrdinalSortKey(1.0), const OrdinalSortKey(1.0)],
const <SemanticsSortKey>[const OrdinalSortKey(0.0), const CustomSortKey(1.0)],
const <SemanticsSortKey>[const OrdinalSortKey(0.0), const CustomSortKey(0.0)],
const <SemanticsSortKey>[const CustomSortKey(0.0), const OrdinalSortKey(0.0)],
const <SemanticsSortKey>[const CustomSortKey(1.0), const OrdinalSortKey(0.0)],
];
final List<int> expectedResults = <int>[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<List<SemanticsSortKey>> tests = const <List<SemanticsSortKey>>[
<SemanticsSortKey>[const OrdinalSortKey(0.0), const OrdinalSortKey(0.0)],
<SemanticsSortKey>[const OrdinalSortKey(0.0), const OrdinalSortKey(1.0)],
<SemanticsSortKey>[const OrdinalSortKey(1.0), const OrdinalSortKey(0.0)],
<SemanticsSortKey>[const OrdinalSortKey(1.0), const OrdinalSortKey(1.0)],
<SemanticsSortKey>[const OrdinalSortKey(0.0), const CustomSortKey(1.0)],
<SemanticsSortKey>[const OrdinalSortKey(0.0), const CustomSortKey(0.0)],
<SemanticsSortKey>[const CustomSortKey(0.0), const OrdinalSortKey(0.0)],
<SemanticsSortKey>[const CustomSortKey(1.0), const OrdinalSortKey(0.0)],
const <SemanticsSortKey>[const OrdinalSortKey(0.0), const OrdinalSortKey(0.0)],
const <SemanticsSortKey>[const OrdinalSortKey(0.0), const OrdinalSortKey(1.0)],
const <SemanticsSortKey>[const OrdinalSortKey(1.0), const OrdinalSortKey(0.0)],
const <SemanticsSortKey>[const OrdinalSortKey(1.0), const OrdinalSortKey(1.0)],
const <SemanticsSortKey>[const OrdinalSortKey(0.0), const CustomSortKey(1.0)],
const <SemanticsSortKey>[const OrdinalSortKey(0.0), const CustomSortKey(0.0)],
const <SemanticsSortKey>[const CustomSortKey(0.0), const OrdinalSortKey(0.0)],
const <SemanticsSortKey>[const CustomSortKey(1.0), const OrdinalSortKey(0.0)],
];
final List<int> expectedResults = <int>[0, -1, 1, 0, 0, 0, 0, 0];
assert(tests.length == expectedResults.length);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment