summaryrefslogtreecommitdiff
path: root/swig/ruby/tests/arch.rb
diff options
context:
space:
mode:
Diffstat (limited to 'swig/ruby/tests/arch.rb')
-rw-r--r--swig/ruby/tests/arch.rb31
1 files changed, 15 insertions, 16 deletions
diff --git a/swig/ruby/tests/arch.rb b/swig/ruby/tests/arch.rb
index 3e2f508..eafca1b 100644
--- a/swig/ruby/tests/arch.rb
+++ b/swig/ruby/tests/arch.rb
@@ -12,44 +12,43 @@ class Zypp::Arch
end
class ArchTest < Test::Unit::TestCase
- include Zypp
def test_arch
# define i386, a builtin
- a = Arch.new("i386")
+ a = Zypp::Arch.new("i386")
assert a
assert_equal "i386", a.to_s
assert_equal true, a.is_builtin
# i486 is 'bigger' than i386
- b = Arch.new("i486")
+ b = Zypp::Arch.new("i486")
assert b
assert_equal "i486", b.to_s
assert b.is_builtin
- if VERSION > 800
+ if Zypp::VERSION > 800
assert_equal a, b.base_arch
end
assert a < b
assert a.compatible_with?(b)
# A new, adventurous architecture
- z = Arch.new("xyzzy")
+ z = Zypp::Arch.new("xyzzy")
assert z
assert_equal "xyzzy", z.to_s
assert_equal false, z.is_builtin
# predefined archs
- assert_equal Arch.new("noarch"), Arch.noarch
- assert_equal a, Arch.i386
- assert_equal b, Arch.i486
- assert_equal Arch.new("i586"), Arch.i586
- assert_equal Arch.new("i686"), Arch.i686
- assert_equal Arch.new("x86_64"), Arch.x86_64
- assert_equal Arch.new("ia64"), Arch.ia64
- assert_equal Arch.new("ppc"), Arch.ppc
- assert_equal Arch.new("ppc64"), Arch.ppc64
- assert_equal Arch.new("s390"), Arch.s390
- assert_equal Arch.new("s390x"), Arch.s390x
+ assert_equal Zypp::Arch.new("noarch"), Zypp::Arch.noarch
+ assert_equal a, Zypp::Arch.i386
+ assert_equal b, Zypp::Arch.i486
+ assert_equal Zypp::Arch.new("i586"), Zypp::Arch.i586
+ assert_equal Zypp::Arch.new("i686"), Zypp::Arch.i686
+ assert_equal Zypp::Arch.new("x86_64"), Zypp::Arch.x86_64
+ assert_equal Zypp::Arch.new("ia64"), Zypp::Arch.ia64
+ assert_equal Zypp::Arch.new("ppc"), Zypp::Arch.ppc
+ assert_equal Zypp::Arch.new("ppc64"), Zypp::Arch.ppc64
+ assert_equal Zypp::Arch.new("s390"), Zypp::Arch.s390
+ assert_equal Zypp::Arch.new("s390x"), Zypp::Arch.s390x
end
end