diff options
Diffstat (limited to 'jni/ruby/test/ruby/test_ifunless.rb')
-rw-r--r-- | jni/ruby/test/ruby/test_ifunless.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/jni/ruby/test/ruby/test_ifunless.rb b/jni/ruby/test/ruby/test_ifunless.rb new file mode 100644 index 0000000..e144ff8 --- /dev/null +++ b/jni/ruby/test/ruby/test_ifunless.rb @@ -0,0 +1,14 @@ +require 'test/unit' + +class TestIfunless < Test::Unit::TestCase + def test_if_unless + x = 'test'; + assert(if x == x then true else false end) + bad = false + unless x == x + bad = true + end + assert(!bad) + assert(unless x != x then true else false end) + end +end |