diff options
Diffstat (limited to 'test/ruby/test_not.rb')
-rw-r--r-- | test/ruby/test_not.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_not.rb b/test/ruby/test_not.rb new file mode 100644 index 0000000000..486075bf83 --- /dev/null +++ b/test/ruby/test_not.rb @@ -0,0 +1,12 @@ +require 'test/unit' + +class TestIfunless < Test::Unit::TestCase + def test_not_with_grouped_expression + assert_equal(false, (not (true))) + assert_equal(true, (not (false))) + end + + def test_not_with_empty_grouped_expression + assert_equal(true, (not ())) + end +end |