Created
March 24, 2014 22:21
-
-
Save mhshams/9750569 to your computer and use it in GitHub Desktop.
unit tests.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test fun `testing a simple add operation`() { | |
assertEquals(4, 2 + 2, "2 + 2 = 4") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How about (mis)using backtick character (`) to define nicer, and probably more readable, names for test methods?
In Kotlin code, one can use backtick character (`) to escape property or method names that are valid identifiers in the language. This is, particularly, useful when you are using a java library which has kotlin identifiers as variable or method name (e.g. in, is, object etc).