Sha256: 65083be630c1c2042e6ebe16b18ae9cf517bd60d00eef8c9d74c49af10d447b8
Contents?: true
Size: 677 Bytes
Versions: 5
Compression:
Stored size: 677 Bytes
Contents
require 'test/unit' require 'cpu' module CPU class MSRTest < Test::Unit::TestCase def setup @cpu0, @cpu1 = CPU.to_a end def test_loaded assert CPU::MSR.available? end def test_instance assert_kind_of CPU::Processor, @cpu0 assert_equal 0, @cpu0.processor_id assert_kind_of CPU::Processor, @cpu1 assert_equal 1, @cpu1.processor_id end def test_temperature assert_operator @cpu0.temperature, '>', 0 assert_operator @cpu1.temperature, '>', 0 end def test_wrong_processor_id assert_raise(InvalidProcessorIdError) do CPU::MSR.new(CPU.num_processors) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
cpu-0.0.4 | tests/msr_test.rb |
cpu-0.0.3 | tests/msr_test.rb |
cpu-0.0.2 | tests/msr_test.rb |
cpu-0.0.1 | tests/msr_test.rb |
cpu-0.0.0 | tests/msr_test.rb |