Fix up some assertions

This commit is contained in:
Jack Nagel 2014-06-11 13:05:10 -05:00
parent ddc615366c
commit f3e9c5c070
3 changed files with 9 additions and 9 deletions

View File

@ -55,10 +55,10 @@ class BuildOptionsTests < Test::Unit::TestCase
end
def test_opposite_of
assert @build.opposite_of(Option.new("with-foo")) == Option.new("without-foo")
assert @build.opposite_of("without-foo") == Option.new("with-foo")
assert @build.opposite_of(Option.new("enable-spam")) == Option.new("disable-spam")
assert @build.opposite_of("disable-beer") == Option.new("enable-beer")
assert_equal Option.new("without-foo"), @build.opposite_of(Option.new("with-foo"))
assert_equal Option.new("with-foo"), @build.opposite_of("without-foo")
assert_equal Option.new("disable-spam"), @build.opposite_of(Option.new("enable-spam"))
assert_equal Option.new("enable-beer"), @build.opposite_of("disable-beer")
end
def test_has_opposite_of?

View File

@ -21,7 +21,7 @@ class OptionTests < Test::Unit::TestCase
assert_not_equal bar, @option
assert @option.eql?(foo)
assert !@option.eql?(bar)
assert bar < foo
assert_operator bar, :<, foo
end
def test_strips_leading_dashes

View File

@ -52,14 +52,14 @@ class CxxStdlibTests < Test::Unit::TestCase
end
def test_type_string_formatting
assert_equal @clang.type_string, 'libstdc++'
assert_equal @lcxx.type_string, 'libc++'
assert_equal "libstdc++", @clang.type_string
assert_equal "libc++", @lcxx.type_string
end
def test_constructing_from_tab
stdlib = Tab.dummy_tab.cxxstdlib
assert_equal stdlib.compiler, :clang
assert_equal stdlib.type, nil
assert_equal :clang, stdlib.compiler
assert_nil stdlib.type
end
def test_compatibility_for_non_cxx_software