diff options
-rwxr-xr-x | swig/ruby/tests/bytecount.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/swig/ruby/tests/bytecount.rb b/swig/ruby/tests/bytecount.rb new file mode 100755 index 0000000..cb1b309 --- /dev/null +++ b/swig/ruby/tests/bytecount.rb @@ -0,0 +1,22 @@ +# +# Test Bytecount +# + +$:.unshift "../../../build/swig/ruby" + + +# test loading of extension +require 'test/unit' + +class LoadTest < Test::Unit::TestCase + def test_loading + require 'zypp' + + g = Zypp::ByteCount.new(Zypp::ByteCount.G) + assert g + gb = Zypp::ByteCount.new(Zypp::ByteCount.GB) + assert gb + k = Zypp::ByteCount.new(Zypp::ByteCount.K) + assert k.to_i == 1024 + end +end |