| Index: tests/lib/crypto/sha256_test.dart
|
| diff --git a/tests/lib/crypto/sha256_test.dart b/tests/lib/crypto/sha256_test.dart
|
| index 5e7ec1e601f13244cc91e0c11db8b8c26c21224a..36d7ecafe60a0982cbd5edcf602e07165275fd3a 100644
|
| --- a/tests/lib/crypto/sha256_test.dart
|
| +++ b/tests/lib/crypto/sha256_test.dart
|
| @@ -293,10 +293,13 @@ void test() {
|
| void testInvalidUse() {
|
| var sha = new SHA256();
|
| sha.digest();
|
| - Expect.throws(sha.digest,
|
| - (e) => e is CryptoHashException);
|
| - Expect.throws(() => sha.update([0]),
|
| - (e) => e is CryptoHashException);
|
| + Expect.throws(() => sha.update([0]), (e) => e is HashException);
|
| +}
|
| +
|
| +void testRepeatedDigest() {
|
| + var sha = new SHA256();
|
| + var digest = sha.digest();
|
| + Expect.listEquals(digest, sha.digest());
|
| }
|
|
|
| void testStandardVectors(inputs, mds) {
|
| @@ -309,6 +312,7 @@ void testStandardVectors(inputs, mds) {
|
| void main() {
|
| test();
|
| testInvalidUse();
|
| + testRepeatedDigest();
|
| testStandardVectors(sha256_long_inputs, sha256_long_mds);
|
| testStandardVectors(sha256_short_inputs, sha256_short_mds);
|
| }
|
|
|