File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed
shared/src/test/scala/scorex/crypto/hash Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,6 @@ import org.scalatest.matchers.should.Matchers
6
6
import org .scalatestplus .scalacheck .ScalaCheckDrivenPropertyChecks
7
7
import scorex .util .encode .Base16
8
8
9
- import scala .concurrent .ExecutionContext .Implicits .global
10
- import scala .concurrent .duration ._
11
- import scala .concurrent .{Await , Future }
12
-
13
9
trait HashTest extends AnyPropSpec
14
10
with ScalaCheckDrivenPropertyChecks
15
11
with Matchers {
@@ -56,15 +52,11 @@ trait HashTest extends AnyPropSpec
56
52
}
57
53
58
54
59
- property(s " ${hash.getClass.getSimpleName} should return correct Tag " ) {
60
- forAll { (string : String , bytes : Array [Byte ]) =>
61
- val digest = hash(string)
62
- digest.isInstanceOf [D ] shouldBe true
63
- if (digest.isInstanceOf [Digest32 ]) {
64
- hash.DigestSize shouldBe 32
65
- } else if (digest.isInstanceOf [Digest64 ]) {
66
- hash.DigestSize shouldBe 64
67
- }
55
+ property(s " ${hash.getClass.getSimpleName} should have correct size " ) {
56
+ if (hash.isInstanceOf [CryptographicHash32 ]) {
57
+ hash.DigestSize shouldBe 32
58
+ } else {
59
+ hash.DigestSize shouldBe 64
68
60
}
69
61
}
70
62
}
You can’t perform that action at this time.
0 commit comments