| Index: tests/lib/crypto/sha1_test.dart
|
| diff --git a/tests/lib/crypto/sha1_test.dart b/tests/lib/crypto/sha1_test.dart
|
| index 94245c6e3304cfb10019e56473f227cad604cfba..cb8c97066acaf327ef99e32fa658943f45f14cdb 100644
|
| --- a/tests/lib/crypto/sha1_test.dart
|
| +++ b/tests/lib/crypto/sha1_test.dart
|
| @@ -549,10 +549,13 @@ void test() {
|
| void testInvalidUse() {
|
| var sha = new SHA1();
|
| 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 SHA1();
|
| + var digest = sha.digest();
|
| + Expect.listEquals(digest, sha.digest());
|
| }
|
|
|
| void testStandardVectors(inputs, mds) {
|
| @@ -565,6 +568,7 @@ void testStandardVectors(inputs, mds) {
|
| void main() {
|
| test();
|
| testInvalidUse();
|
| + testRepeatedDigest();
|
| testStandardVectors(sha1_long_inputs, sha1_long_mds);
|
| testStandardVectors(sha1_short_inputs, sha1_short_mds);
|
| }
|
|
|