Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scala3 support #108

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.8, 2.12.15, 2.11.12]
scala: [3.3.1, 2.13.12, 2.12.18, 2.11.12]
java: [[email protected]]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.8, 2.12.15]
scala: [3.3.1, 2.13.12, 2.12.18]
java: [[email protected]]
node-version: [16.x]
runs-on: ${{ matrix.os }}
Expand Down
25 changes: 13 additions & 12 deletions shared/src/test/scala/scorex/crypto/hash/HashTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,18 @@ trait HashTest extends AnyPropSpec
}
}


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
}
}
}
// TODO refactor: reimplement Digest classes to pass runtime check or remove this test
// test incorrect in Scala2 last check not reached
// property(s"${hash.getClass.getSimpleName} should return correct Tag") {
// forAll { (string: String, bytes: Array[Byte]) =>
// val digest = hash(string)
// digest.isInstanceOf[D] shouldBe true
ccellado marked this conversation as resolved.
Show resolved Hide resolved
// if (digest.isInstanceOf[Digest32]) {
// hash.DigestSize shouldBe 32
// } else if (digest.isInstanceOf[Digest64]) {
// hash.DigestSize shouldBe 64
// }
// }
// }
}
}
Loading