blob: 5b46e14c8f189e3e50fd92a7d1232b1046a92afc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#
# Test Bytecount
#
$:.unshift "../../../build/swig/ruby"
# test loading of extension
require 'test/unit'
class LoadTest < Test::Unit::TestCase
require 'zypp'
include Zypp
def test_bytecount
g = ByteCount.new(ByteCount.G)
assert g
gb = ByteCount.new(ByteCount.GB)
assert gb
k = ByteCount.new(ByteCount.K)
assert k.to_i == 1024
mb = ByteCount.new(ByteCount.MB)
assert mb.to_i == 1000*1000
end
end
|