diff --git a/app/views/userGuide/usingMatchers.scala.html b/app/views/userGuide/usingMatchers.scala.html index 27b52bbbec..e9311e5289 100644 --- a/app/views/userGuide/usingMatchers.scala.html +++ b/app/views/userGuide/usingMatchers.scala.html @@ -204,6 +204,23 @@
TypeCheckedTripleEquals
, however, the statement fails to compile. For more information
and examples, see the main documentation for trait TypeCheckedTripleEquals
.
+An example of TypeCheckedTripleEquals mixed in a test class:
+ ++import org.scalatest._ +import org.scalactic.TypeCheckedTripleEquals + +class MyTest extends FunSuite with Matchers with TypeCheckedTripleEquals { + + test("Type checked ===") { + val i: Int = 42 + val s: String = "42" + + i should === (s) // Do not compile because i is an Int and s is a String, great ! + } +} ++