Skip to content

Commit

Permalink
Scala 3.5.0-RC7 (#73)
Browse files Browse the repository at this point in the history
+ fix some warnings around method as function syntax
  • Loading branch information
fmonniot authored Aug 12, 2024
1 parent 5ae718e commit 558c227
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
scalaV:
- "3.3.3"
- "3.4.2"
- "3.5.0-RC2"
- "3.5.0-RC7"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class MockSuite extends munit.FunSuite with ScalaMocks {
assertEquals(m.curriedFuncReturn(2), doubleToString)

// Polymorphic methods
when(m.polymorphic _).expects(List(2)).returns("a1")
when(m.polymorphic).expects(List(2)).returns("a1")
assertEquals(m.polymorphic(List(2)), "a1")

val javaObject = Object()
Expand All @@ -65,7 +65,7 @@ class MockSuite extends munit.FunSuite with ScalaMocks {
when(m.polymorphicParam).expects((1, 2.0)).returns("ok")
assertEquals(m.polymorphicParam((1, 2.0)), "ok")

when(m.repeatedParam _).expects(0, Seq.empty).returning("hello")
when(m.repeatedParam).expects(0, Seq.empty).returning("hello")
assertEquals(m.repeatedParam(0), "hello")

// Partially supported. Issue with type inference still. See https://github.com/fmonniot/scala3mock/issues/4
Expand Down Expand Up @@ -97,7 +97,7 @@ class MockSuite extends munit.FunSuite with ScalaMocks {
assertEquals(m.contextBound("arg"), "ok")

// type bound methods
when(m.upperBound _).expects(TestException()).returns(1)
when(m.upperBound).expects(TestException()).returns(1)
assertEquals(m.upperBound(TestException()), 1)

val animal = Animal()
Expand Down

0 comments on commit 558c227

Please sign in to comment.