Index: test/sha256_test.dart |
diff --git a/test/sha256_test.dart b/test/sha256_test.dart |
index a56d75af5dfcdb6dd0bf4adb237ec1ad9800c025..1c6653e311d0f9d8bbae266df7d0d0ec994b1fd3 100644 |
--- a/test/sha256_test.dart |
+++ b/test/sha256_test.dart |
@@ -3,6 +3,7 @@ |
// BSD-style license that can be found in the LICENSE file. |
import "dart:async"; |
+import "dart:convert"; |
import "package:test/test.dart"; |
import "package:crypto/crypto.dart"; |
@@ -24,6 +25,21 @@ void main() { |
sink.close(); |
sink.close(); |
}); |
+ |
+ test('close closes the underlying sink', () { |
+ var inner = new ChunkedConversionSink<Digest>.withCallback( |
+ expectAsync((accumulated) { |
+ expect(accumulated.length, equals(1)); |
+ expect( |
+ accumulated.first.toString(), |
+ equals( |
+ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b8" |
+ "55")); |
+ })); |
+ |
+ var outer = sha256.startChunkedConversion(inner); |
+ outer.close(); |
+ }); |
}); |
group("standard vector", () { |