2011-03-10 05:11:03 +00:00
|
|
|
class Cpptest < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Unit testing framework handling automated tests in C++"
|
2014-12-31 13:19:09 +00:00
|
|
|
homepage "http://cpptest.sourceforge.net/"
|
|
|
|
url "https://downloads.sourceforge.net/project/cpptest/cpptest/cpptest-1.1.2/cpptest-1.1.2.tar.gz"
|
|
|
|
sha1 "c8e69ca98f9b39016c94f1f78659f412ee825049"
|
2010-08-30 14:43:32 +00:00
|
|
|
|
2014-07-03 17:36:37 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2014-12-31 13:38:52 +00:00
|
|
|
revision 1
|
|
|
|
sha1 "5848e63c76547c2caada10bc0c13a8fe5fe57ac3" => :yosemite
|
|
|
|
sha1 "690ac2342b37b3849da30d289e04c13e1430db3e" => :mavericks
|
|
|
|
sha1 "ec143d787f9f5dd0ba295d1fbb80c1a7d54fa780" => :mountain_lion
|
2014-07-03 17:36:37 +00:00
|
|
|
end
|
|
|
|
|
2010-08-30 14:43:32 +00:00
|
|
|
def install
|
2012-07-29 16:23:57 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
2010-08-30 14:43:32 +00:00
|
|
|
"--prefix=#{prefix}"
|
2014-12-31 13:19:09 +00:00
|
|
|
system "make", "install"
|
2010-08-30 14:43:32 +00:00
|
|
|
end
|
2014-12-31 13:26:00 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.cpp").write <<-EOS.undent
|
|
|
|
#include <assert.h>
|
|
|
|
#include <cpptest.h>
|
|
|
|
|
|
|
|
class TestCase: public Test::Suite
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TestCase() { TEST_ADD(TestCase::test); }
|
|
|
|
void test() { TEST_ASSERT(1 + 1 == 2); }
|
|
|
|
};
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
TestCase ts;
|
|
|
|
Test::TextOutput output(Test::TextOutput::Verbose);
|
|
|
|
assert(ts.run(output));
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
system ENV.cxx, "test.cpp", "-lcpptest", "-o", "test"
|
|
|
|
system "./test"
|
|
|
|
end
|
2010-08-30 14:43:32 +00:00
|
|
|
end
|