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

Example of TypeCheckedTripleEquals mixed in a test class #62

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ronanM
Copy link

@ronanM ronanM commented Dec 7, 2016

No description provided.

<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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

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 !
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is to show the behaviour of TypeCheckedTripleEquals at compile-time.

@plinlor
Copy link
Contributor

plinlor commented Aug 10, 2020

@cla-bot[bot] check

@cla-bot
Copy link

cla-bot bot commented Aug 10, 2020

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.

@cla-bot
Copy link

cla-bot bot commented Aug 10, 2020

The cla-bot has been summoned, and re-checked this pull request!

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

Successfully merging this pull request may close these issues.

3 participants