| Index: tests/lib/src/crypto/sha1_test.dart
|
| diff --git a/tests/lib/src/crypto/sha1Test.dart b/tests/lib/src/crypto/sha1_test.dart
|
| similarity index 99%
|
| rename from tests/lib/src/crypto/sha1Test.dart
|
| rename to tests/lib/src/crypto/sha1_test.dart
|
| index 88334eb10b54b3ba331874ff7b7151159cf1f42d..4153e596d9b9ce4abcecaaf4c89d3211c03211c0 100644
|
| --- a/tests/lib/src/crypto/sha1Test.dart
|
| +++ b/tests/lib/src/crypto/sha1_test.dart
|
| @@ -548,10 +548,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) {
|
| @@ -564,6 +567,7 @@ void testStandardVectors(inputs, mds) {
|
| void main() {
|
| test();
|
| testInvalidUse();
|
| + testRepeatedDigest();
|
| testStandardVectors(sha1_long_inputs, sha1_long_mds);
|
| testStandardVectors(sha1_short_inputs, sha1_short_mds);
|
| }
|
|
|