Skip to content

Commit

Permalink
Scala tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
lenguyenthanh committed Oct 31, 2023
1 parent 220d8a5 commit 3e14256
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions bench/src/main/scala/benchmarks/PlayBench.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ class PlayBench:

@Benchmark
def divider(bh: Blackhole) =
var result = dividerGames.map { x =>
var result = dividerGames.map: x =>
Blackhole.consumeCPU(Work)
Divider(x)
}
bh.consume(result)
result

Expand Down
4 changes: 2 additions & 2 deletions test-kit/src/test/scala/bitboard/BitboardTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class BitboardTest extends ScalaCheckSuite:

test("the result of add should contain the added square"):
forAll: (bb: Bitboard, square: Square) =>
assertEquals((bb.add(square).contains(square)), true)
assertEquals(bb.add(square).contains(square), true)

test("Square.bb.singleSquare == Some(square)"):
forAll: (square: Square) =>
Expand Down Expand Up @@ -121,7 +121,7 @@ class BitboardTest extends ScalaCheckSuite:

test("isDisjoint and intersects always return the opposite value"):
forAll: (b1: Bitboard, b2: Bitboard) =>
b1.isDisjoint(b2) == !b1.intersects(b2)
b1.isDisjoint(b2) != b1.intersects(b2)

property("forall"):
forAll: (b: Bitboard, f: Square => Boolean) =>
Expand Down

0 comments on commit 3e14256

Please sign in to comment.