The testing library ScalaTest also has a way of checking that a snippet of code
does not compile: pass it in to assertTypeError
.
The testing library ScalaTest also has a way of checking that a snippet of code
does not compile: pass it in to assertTypeError
. What will happen if we combine
illTyped
and assertTypeError
? (Hint: it's like applying a double negative.)
This method has been deprecated in favor of macro assertion and will be removed in a future version of ScalaTest. If you need this, please copy the source code into your own trait instead.
This method has been deprecated in favor of macro assertion and will be removed in a future version of ScalaTest. If you need this, please copy the source code into your own trait instead.
This method has been deprecated in favor of macro assumption and will be removed in a future version of ScalaTest. If you need this, please copy the source code into your own trait instead.
This method has been deprecated in favor of macro assumption and will be removed in a future version of ScalaTest. If you need this, please copy the source code into your own trait instead.
Please use 'an [Exception] should be thrownBy { ... }' syntax instead
This expect method has been deprecated. Please replace all invocations of expect with an identical invocation of assertResult instead.
This expect method has been deprecated. Please replace all invocations of expect with an identical invocation of assertResult instead.
This expectResult method has been deprecated. Please replace all invocations of expectResult with an identical invocation of assertResult instead.
This expectResult method has been deprecated. Please replace all invocations of expectResult with an identical invocation of assertResult instead.
Testing for non-compilation
Libraries like shapeless which make extensive use of type-level computation and implicit resolution often need to provide guarantees that certain expressions *don't* typecheck. Testing these guarantees is supported in shapeless via the
illTyped
macro,