diff options
| author | Markus Reiter | 2017-02-15 22:37:39 +0100 |
|---|---|---|
| committer | GitHub | 2017-02-15 22:37:39 +0100 |
| commit | f8e5716bab2239efab702990ebcb0d05c8f084cf (patch) | |
| tree | ae9ededf4a98ce4904f382581ab01dad982a7a12 /Library/Homebrew/test/stdlib_test.rb | |
| parent | ec27b69ba2717ccf2c5fcd3c1e73a5f884a0a6a6 (diff) | |
| parent | b89c0f16dd5e5d75e6e72187bf2956ce456c8090 (diff) | |
| download | brew-f8e5716bab2239efab702990ebcb0d05c8f084cf.tar.bz2 | |
Merge pull request #2023 from reitermarkus/spec-cxxstdlib
Convert CxxStdlib test to spec.
Diffstat (limited to 'Library/Homebrew/test/stdlib_test.rb')
| -rw-r--r-- | Library/Homebrew/test/stdlib_test.rb | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/Library/Homebrew/test/stdlib_test.rb b/Library/Homebrew/test/stdlib_test.rb deleted file mode 100644 index f193ae71e..000000000 --- a/Library/Homebrew/test/stdlib_test.rb +++ /dev/null @@ -1,63 +0,0 @@ -require "testing_env" -require "formula" -require "cxxstdlib" - -class CxxStdlibTests < Homebrew::TestCase - def setup - super - @clang = CxxStdlib.create(:libstdcxx, :clang) - @gcc = CxxStdlib.create(:libstdcxx, :gcc) - @gcc40 = CxxStdlib.create(:libstdcxx, :gcc_4_0) - @gcc42 = CxxStdlib.create(:libstdcxx, :gcc_4_2) - @gcc48 = CxxStdlib.create(:libstdcxx, "gcc-4.8") - @gcc49 = CxxStdlib.create(:libstdcxx, "gcc-4.9") - @lcxx = CxxStdlib.create(:libcxx, :clang) - @purec = CxxStdlib.create(nil, :clang) - end - - def test_apple_libstdcxx_intercompatibility - assert @clang.compatible_with?(@gcc) - assert @clang.compatible_with?(@gcc42) - end - - def test_compatibility_same_compilers_and_type - assert @gcc.compatible_with?(@gcc) - assert @gcc48.compatible_with?(@gcc48) - assert @clang.compatible_with?(@clang) - end - - def test_apple_gnu_libstdcxx_incompatibility - assert !@clang.compatible_with?(@gcc48) - assert !@gcc48.compatible_with?(@clang) - end - - def test_gnu_cross_version_incompatibility - assert !@gcc48.compatible_with?(@gcc49) - assert !@gcc49.compatible_with?(@gcc48) - end - - def test_libstdcxx_libcxx_incompatibility - assert !@clang.compatible_with?(@lcxx) - assert !@lcxx.compatible_with?(@clang) - end - - def test_apple_compiler_reporting - assert_predicate @clang, :apple_compiler? - assert_predicate @gcc, :apple_compiler? - assert_predicate @gcc42, :apple_compiler? - refute_predicate @gcc48, :apple_compiler? - end - - def test_type_string_formatting - assert_equal "libstdc++", @clang.type_string - assert_equal "libc++", @lcxx.type_string - end - - def test_compatibility_for_non_cxx_software - assert @purec.compatible_with?(@clang) - assert @clang.compatible_with?(@purec) - assert @purec.compatible_with?(@purec) - assert @purec.compatible_with?(@gcc48) - assert @gcc48.compatible_with?(@purec) - end -end |
