-
Notifications
You must be signed in to change notification settings - Fork 641
[Scala3][WIP] Scala3 testing I #5083
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
base: main
Are you sure you want to change the base?
Conversation
fa56dfd to
2e3d722
Compare
seldridge
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM. Some nits and there are some issues with CI.
| import org.scalatest.funspec.AnyFunSpec | ||
| import org.scalatest.matchers.must.Matchers | ||
| import org.scalatest.matchers.should.Matchers.convertToAnyShouldWrapper | ||
| // import org.scalatest.matchers.should.Matchers.convertToStringShouldWrapperForVerb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: please don't commit commented out code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah this is a tricky one. the scalatest API is subtly different between Scala 2 and 3 leading to an either-or situation as to which ShouldWrapper to use. will revisit and fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check that ScalaTest doesn't already have a way to deal with this--it would be pretty bush league for such a popular library to screw this up. If they dont then we can polyfill it ourselves by adding a type alias for one or the other in the version-specific sources (e.g. in src/main/scala-2 define org.scalatest.matchers.should.Matchers.convertToStringShouldWrapperForVerb as a type alias for org.scalatest.matchers.should.Matchers.convertToAnyShouldWrapper).
| val in = IO(Input(UInt(8.W))) | ||
| val fd = SimLog.file("logfile.log") | ||
| fd.printf("in = %d\n", in) | ||
| // fd.printf("in = %d\n", in) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this shouldn't be commented out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised this file has so many lines added. Can you clarify what is going on?
02921bb to
a482a98
Compare
a482a98 to
85ad8fa
Compare
Move spec files from src/test/scala-2 to src/test/scala/ and update for cross-compilation with Scala 3.
Contributor Checklist
docs/src?Type of Improvement
Desired Merge Strategy
Release Notes
Reviewer Checklist (only modified by reviewer)
3.6.x,5.x, or6.xdepending on impact, API modification or big change:7.0)?Enable auto-merge (squash)and clean up the commit message.Create a merge commit.