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

Enhance type inference for intercept and assertThrows #2043

Open
wants to merge 1 commit into
base: 3.2.x-new
Choose a base branch
from

Conversation

vincentdehaan
Copy link

This PR makes it possible to leave out the type parameter on assertThrows and intercept. In this case, it will catch any Exception.

@cla-bot cla-bot bot added the cla-signed label Jun 21, 2021
@cheeseng
Copy link
Contributor

@vincentdehaan I tried to build and test this, but unfortunately I got quite a number of failing tests:

*** 78 TESTS FAILED ***
...
[error] Failed tests:
[error] 	org.scalatest.SuiteSuite
[error] 	org.scalatest.StatusSpec
[error] 	org.scalatest.RefSpecSpec
[error] 	org.scalatest.tools.XmlSocketReporterSpec
[error] 	org.scalatest.path.FunSpecSpec
[error] 	org.scalatest.path.FreeSpecSpec
[error] 	org.scalatest.ClueSpec
[error] 	org.scalatest.BeforeAndAfterEachAsyncSuite
[error] 	org.scalatest.AppendedCluesSpec
[error] 	org.scalatest.tools.DiscoverySuiteSuite
[error] 	org.scalatest.BeforeAndAfterAsyncSuite
[error] 	org.scalatest.AssertionsSpec
[error] 	org.scalatest.concurrent.JavaFuturesSpec
[error] 	org.scalatest.tools.FrameworkSuite
[error] 	org.scalatest.exceptions.PayloadSpec
[error] 	org.scalatest.OutcomeSpec
[error] 	org.scalatest.concurrent.EventuallySpec
[error] 	org.scalatest.concurrent.WaitersSpec
[error] 	org.scalatest.concurrent.ScalaFuturesSpec
[error] (scalatestFeatureSpecTest / Test / test) sbt.TestsFailedException: Tests unsuccessful
[error] (scalatestFunSuiteTest / Test / test) sbt.TestsFailedException: Tests unsuccessful
[error] (scalatestFlatSpecTest / Test / test) sbt.TestsFailedException: Tests unsuccessful
[error] (scalatestFreeSpecTest / Test / test) sbt.TestsFailedException: Tests unsuccessful
[error] (scalatestPropSpecTest / Test / test) sbt.TestsFailedException: Tests unsuccessful
[error] (scalatestFunSpecTest / Test / test) sbt.TestsFailedException: Tests unsuccessful
[error] (scalatestWordSpecTest / Test / test) sbt.TestsFailedException: Tests unsuccessful
[error] (scalatest-test / Test / test) sbt.TestsFailedException: Tests unsuccessful
[error] (scalactic-test / Test / test) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 248 s (04:08), completed Jun 22, 2021 11:09:51 AM

You may reproduce that by running

> sbt clean test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants