Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: test/typed_buffers_test.dart

Issue 1728943003: Fix TypedDataBuffer.insertAll() with an Iterable. (Closed) Base URL: git@github.com:dart-lang/typed_data@master
Patch Set: Code review changes Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/typed_buffers_test.dart
diff --git a/test/typed_buffers_test.dart b/test/typed_buffers_test.dart
index 0c99a404c89c066070c574a2cebc68e22e8efda9..9e97592adb85257f6ecfc61769d6906c894ad63d 100644
--- a/test/typed_buffers_test.dart
+++ b/test/typed_buffers_test.dart
@@ -109,6 +109,13 @@ main() {
expect(buffer, equals([2, 3, 4, 5, 6, 1, 7, 8, 9, 10]));
});
+ // Regression test for #1.
+ test("inserts values into the buffer after removeRange()", () {
+ buffer.removeRange(1, 4);
+ buffer.insertAll(1, source);
+ expect(buffer, equals([6, 1, 2, 3, 4, 5, 10]));
+ });
+
test("does nothing for empty slices", () {
buffer.insertAll(1, source, 0, 0);
expect(buffer, equals([6, 7, 8, 9, 10]));
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698