Skip to content

Commit

Permalink
✅ update array_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
techouse committed May 18, 2024
1 parent f11e9ae commit 5fb8e6c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions test/unit/array_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,21 @@ import 'package:test/test.dart';
void main() {
group('SplayTreeMap', () {
test('indices are ordered in value', () {
final SplayTreeMap<int, String> array =
SplayTreeMap<int, String>.from({1: 'a', 0: 'b', 2: 'c'});
final SplayTreeMap<String, String> array =
SplayTreeMap<String, String>.from({
'1': 'a',
'0': 'b',
'2': 'c',
});

expect(array.values, ['b', 'a', 'c']);
});

test('indices are ordered in value 2', () {
final SplayTreeMap<int, String> array = SplayTreeMap<int, String>();
array[1] = 'c';
array[0] = 'b';
array[2] = 'd';
final SplayTreeMap<String, String> array = SplayTreeMap<String, String>();
array['1'] = 'c';
array['0'] = 'b';
array['2'] = 'd';

expect(array.values, ['b', 'c', 'd']);
});
Expand Down

0 comments on commit 5fb8e6c

Please sign in to comment.