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

Evaluate expression on munit assertEquals retrun wrong result #141

Closed
adpi2 opened this issue Oct 13, 2021 · 0 comments · Fixed by #147
Closed

Evaluate expression on munit assertEquals retrun wrong result #141

adpi2 opened this issue Oct 13, 2021 · 0 comments · Fixed by #147
Labels
bug Something isn't working runtime evaluation

Comments

@adpi2
Copy link
Member

adpi2 commented Oct 13, 2021

class MySuite extends munit.FunSuite {
  def sum(list: List[Int]): Int = list.sum

  test("sum of a few numbers (10pts)") {
=>    assertEquals(sum(List(1,2,0)), 3)
  }
}
> 1 + 1
"values are not the same"

It seems that the expression evaluator returns the value of the by-name parameter clue in assertEquals.

The reproduction test is added in #140. It is flagged as pending until we fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working runtime evaluation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant