-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
This test:
scrypto/shared/src/test/scala/scorex/crypto/hash/HashTest.scala
Lines 59 to 69 in 1d2db26
| property(s"${hash.getClass.getSimpleName} should return correct Tag") { | |
| forAll { (string: String, bytes: Array[Byte]) => | |
| val digest = hash(string) | |
| digest.isInstanceOf[D] shouldBe true | |
| if (digest.isInstanceOf[Digest32]) { | |
| hash.DigestSize shouldBe 32 | |
| } else if (digest.isInstanceOf[Digest64]) { | |
| hash.DigestSize shouldBe 64 | |
| } | |
| } | |
| } |
is not functional within scala 2.
This came up during work on
Reproduce
- just replace 32/64
hash.DigestSize shouldBe 32with a wrong value, the test will not fail. - or: add breakpoints to lines 64 and 66
- or: add
else { fail("Tag is not Digest32 or Digest64") }to line 67 - Scala3 support #108 (review) (reproducer in CI)
Tasks
- disable the non-functioning part
- find a solution to have the Tag available in runtime
- provide a new test (for scala 2 and 3)
Metadata
Metadata
Assignees
Labels
No labels