-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add toString() to all CopyOnWrite collections.
- Loading branch information
1 parent
daf1bb9
commit 520c516
Showing
8 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright (c) 2016, Google Inc. Please see the AUTHORS file for details. | ||
// All rights reserved. Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
import 'package:built_collection/src/internal/copy_on_write_list.dart'; | ||
import 'package:unittest/unittest.dart'; | ||
|
||
void main() { | ||
group('CopyOnWriteList', () { | ||
test('has toString equal to List.toString', () { | ||
final list = <int>[1, 2, 3]; | ||
expect(new CopyOnWriteList(list, false).toString(), list.toString()); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright (c) 2016, Google Inc. Please see the AUTHORS file for details. | ||
// All rights reserved. Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
import 'package:built_collection/src/internal/copy_on_write_map.dart'; | ||
import 'package:unittest/unittest.dart'; | ||
|
||
void main() { | ||
group('CopyOnWriteMap', () { | ||
test('has toString equal to Map.toString', () { | ||
final map = <int, String>{1: 'one', 2: 'two', 3: 'three'}; | ||
expect(new CopyOnWriteMap(map).toString(), map.toString()); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright (c) 2016, Google Inc. Please see the AUTHORS file for details. | ||
// All rights reserved. Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
import 'package:built_collection/src/internal/copy_on_write_set.dart'; | ||
import 'package:unittest/unittest.dart'; | ||
|
||
void main() { | ||
group('CopyOnWriteSet', () { | ||
test('has toString equal to Set.toString', () { | ||
final set = new Set<int>.from([1, 2, 3]); | ||
expect(new CopyOnWriteSet(set).toString(), set.toString()); | ||
}); | ||
}); | ||
} |