2005-12-17 06:46:23 +00:00
|
|
|
#!/usr/bin/env ruby
|
2005-10-11 22:37:41 +00:00
|
|
|
|
|
|
|
$:.unshift(File.join(File.dirname(__FILE__), '..', '..'))
|
|
|
|
|
|
|
|
require 'test/unit'
|
2005-11-09 04:18:08 +00:00
|
|
|
require 'rex/text'
|
2005-10-11 22:37:41 +00:00
|
|
|
require 'rex/arch/sparc'
|
|
|
|
|
|
|
|
class Rex::Arch::Sparc::UnitTest < ::Test::Unit::TestCase
|
|
|
|
|
|
|
|
Klass = Rex::Arch::Sparc
|
|
|
|
|
|
|
|
def test_set
|
|
|
|
assert_equal("\x88\x10\x20\x02", Klass.set(0x2, 'g4'))
|
|
|
|
assert_equal("\x09\x00\x00\x08\x88\x11\x22\x22", Klass.set(0x2222, 'g4'))
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|