Bump to libzypp-bindings 0.7.4
[platform/upstream/libzypp-bindings.git] / swig / ruby / tests / bytecount.rb
1 #
2 # Test Bytecount
3 #
4
5 $:.unshift "../../../build/swig/ruby"
6
7
8 # test loading of extension
9 require 'test/unit'
10
11 class LoadTest < Test::Unit::TestCase
12   require 'zypp'
13
14   def test_bytecount
15     g = Zypp::ByteCount.new(Zypp::ByteCount.G)
16     assert g
17     gb = Zypp::ByteCount.new(Zypp::ByteCount.GB)
18     assert gb
19     k = Zypp::ByteCount.new(Zypp::ByteCount.K)
20     assert k.to_i == 1024
21     mb = Zypp::ByteCount.new(Zypp::ByteCount.MB)
22     assert mb.to_i == 1000*1000
23   end
24 end