| Index: tests/lib/src/crypto/sha256_test.dart
|
| diff --git a/tests/lib/src/crypto/sha256Test.dart b/tests/lib/src/crypto/sha256_test.dart
|
| similarity index 98%
|
| rename from tests/lib/src/crypto/sha256Test.dart
|
| rename to tests/lib/src/crypto/sha256_test.dart
|
| index ed59d20535cf9cd6d9585029949b47c9b7207786..aa56947423e27c5c31788170c5669862c41bcef7 100644
|
| --- a/tests/lib/src/crypto/sha256Test.dart
|
| +++ b/tests/lib/src/crypto/sha256_test.dart
|
| @@ -292,10 +292,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) {
|
| @@ -308,6 +311,7 @@ void testStandardVectors(inputs, mds) {
|
| void main() {
|
| test();
|
| testInvalidUse();
|
| + testRepeatedDigest();
|
| testStandardVectors(sha256_long_inputs, sha256_long_mds);
|
| testStandardVectors(sha256_short_inputs, sha256_short_mds);
|
| }
|
|
|