Permalink
Browse files

Clean up fails_with test classes

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
  • Loading branch information...
1 parent b84845c commit 89899c234552dc480ef0c9a97f8255bdc54e0113 @jacknagel jacknagel committed Apr 7, 2012
Showing with 9 additions and 43 deletions.
  1. +9 −43 Library/Homebrew/test/testball.rb
@@ -41,83 +41,49 @@ def install
end
end
-class TestAllCompilerFailures < Formula
+class TestCompilerFailures < Formula
def initialize name=nil
@url="file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
@homepage = 'http://example.com/'
super "compilerfailures"
end
+end
+class TestAllCompilerFailures < TestCompilerFailures
fails_with :clang
fails_with :llvm
fails_with :gcc
end
-class TestNoCompilerFailures < Formula
- def initialize name=nil
- @url="file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
- @homepage = 'http://example.com/'
- super "nocompilerfailures"
- end
-
+class TestNoCompilerFailures < TestCompilerFailures
fails_with(:clang) { build 42 }
fails_with(:llvm) { build 42 }
fails_with(:gcc) { build 42 }
end
-class TestLLVMFailure < Formula
- def initialize name=nil
- @url="file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
- @homepage = 'http://example.com/'
- super "llvmfailure"
- end
-
+class TestLLVMFailure < TestCompilerFailures
fails_with :llvm
end
-class TestMixedCompilerFailures < Formula
- def initialize name=nil
- @url="file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
- @homepage = 'http://example.com/'
- super "mixedcompilerfailures"
- end
-
+class TestMixedCompilerFailures < TestCompilerFailures
fails_with(:clang) { build MacOS.clang_build_version }
fails_with(:llvm) { build 42 }
fails_with(:gcc) { build 5666 }
end
-class TestMoreMixedCompilerFailures < Formula
- def initialize name=nil
- @url="file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
- @homepage = 'http://example.com/'
- super "moremixedcompilerfailures"
- end
-
+class TestMoreMixedCompilerFailures < TestCompilerFailures
fails_with(:clang) { build 42 }
fails_with(:llvm) { build 2336 }
fails_with(:gcc) { build 5666 }
end
-class TestEvenMoreMixedCompilerFailures < Formula
- def initialize name=nil
- @url="file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
- @homepage = 'http://example.com/'
- super "evenmoremixedcompilerfailures"
- end
-
+class TestEvenMoreMixedCompilerFailures < TestCompilerFailures
fails_with :clang
fails_with(:llvm) { build 2336 }
fails_with(:gcc) { build 5648 }
end
-class TestBlockWithoutBuildCompilerFailure < Formula
- def initialize name=nil
- @url="file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
- @homepage = 'http://example.com/'
- super "blockwithoutbuildcompilerfailure"
- end
-
+class TestBlockWithoutBuildCompilerFailure < TestCompilerFailures
fails_with :clang do
cause "failure"
end

0 comments on commit 89899c2

Please sign in to comment.