aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_hardware.rb
blob: ff086b1e92e682c559b26e41ba2704fa8b0d355a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
require 'testing_env'
require 'hardware'

class HardwareTests < Test::Unit::TestCase
  def test_hardware_cpu_type
    assert [:intel, :ppc].include?(Hardware::CPU.type)
  end

  def test_hardware_intel_family
    families = [:core, :core2, :penryn, :nehalem, :arrandale, :sandybridge, :ivybridge, :haswell]
    assert families.include?(Hardware::CPU.family)
  end if Hardware::CPU.intel?
end