Last active
April 2, 2019 09:58
-
-
Save mhberger/d226c618962003d347c9 to your computer and use it in GitHub Desktop.
Groovy Truth
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
// based on http://groovy.329449.n5.nabble.com/String-isEmpty-tp346469p346472.html | |
assert !(0 as char) | |
assert (1 as char) | |
assert !0 | |
assert 1 | |
assert !0.0 | |
assert !'' | |
assert '1' | |
assert '0' | |
assert !"" | |
assert "1" | |
assert "0" | |
assert !"""""" | |
assert """1""" | |
assert """0""" | |
assert !null | |
assert new Object() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment