Example of TypeCheckedTripleEquals mixed in a test class#62
Conversation
| <span class="stReserved">class</span> MyTest <span class="stReserved">extends</span> FunSuite <span class="stReserved">with</span> Matchers <span class="stReserved">with</span> TypeCheckedTripleEquals { | ||
|
|
||
| test("Type checked ===") { | ||
| val i : Int = 42 |
There was a problem hiding this comment.
Small detail, but the code convention used in the rest of the file for val declarations would be to remove the space before the : / after the variable name, so val i: Int = 42 maybe?
| 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 ! |
There was a problem hiding this comment.
Might be a little confusing, since this isn't really a valid test case, and the code would never compile...does it make more sense to have an example with i !=== (s)?
There was a problem hiding this comment.
The idea is to show the behaviour of TypeCheckedTripleEquals at compile-time.
|
@cla-bot[bot] check |
|
Hi @ronanM, we require contributors to sign our Contributor License Agreement, and we don't have yours on file. In order for us to review and merge your code, please access https://www.artima.com/cla/choose-type to sign our Contributor License Agreement. Your effort is highly appreciated. Thank you. |
|
The cla-bot has been summoned, and re-checked this pull request! |
No description provided.