5 $:.unshift File.expand_path(File.join(File.dirname(__FILE__),"..","..","..","build","swig","ruby"))
14 class ArchTest < Test::Unit::TestCase
16 # define i386, a builtin
18 a = Zypp::Arch.new("i386")
20 assert_equal "i386", a.to_s
21 assert_equal true, a.is_builtin
23 # i486 is 'bigger' than i386
25 b = Zypp::Arch.new("i486")
27 assert_equal "i486", b.to_s
29 if Zypp::VERSION > 800
30 assert_equal a, b.base_arch
33 assert a.compatible_with?(b)
35 # A new, adventurous architecture
36 z = Zypp::Arch.new("xyzzy")
38 assert_equal "xyzzy", z.to_s
39 assert_equal false, z.is_builtin
42 assert_equal Zypp::Arch.new("noarch"), Zypp::Arch.noarch
43 assert_equal a, Zypp::Arch.i386
44 assert_equal b, Zypp::Arch.i486
45 assert_equal Zypp::Arch.new("i586"), Zypp::Arch.i586
46 assert_equal Zypp::Arch.new("i686"), Zypp::Arch.i686
47 assert_equal Zypp::Arch.new("x86_64"), Zypp::Arch.x86_64
48 assert_equal Zypp::Arch.new("ia64"), Zypp::Arch.ia64
49 assert_equal Zypp::Arch.new("ppc"), Zypp::Arch.ppc
50 assert_equal Zypp::Arch.new("ppc64"), Zypp::Arch.ppc64
51 assert_equal Zypp::Arch.new("s390"), Zypp::Arch.s390
52 assert_equal Zypp::Arch.new("s390x"), Zypp::Arch.s390x