sigar/bindings/ruby/test/swap_test.rb
Doug MacEachern 57513b2d0a use helper
2010-01-17 19:00:26 -08:00

21 lines
443 B
Ruby

$LOAD_PATH.unshift File.dirname(__FILE__)
require 'helper'
class SwapTest < Test::Unit::TestCase
def test_swap
sigar = Sigar.new
swap = sigar.swap
assert_gt_eq_zero swap.total, "total"
assert_gt_eq_zero swap.used, "used"
assert_gt_eq_zero swap.free, "free"
assert_eq swap.total - swap.used, swap.free, "total-used==free"
assert_any swap.page_in, "page_in"
assert_any swap.page_out, "page_out"
end
end