class Cpptest < Formula 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" bottle do cellar :any revision 1 sha1 "5848e63c76547c2caada10bc0c13a8fe5fe57ac3" => :yosemite sha1 "690ac2342b37b3849da30d289e04c13e1430db3e" => :mavericks sha1 "ec143d787f9f5dd0ba295d1fbb80c1a7d54fa780" => :mountain_lion end def install system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" system "make", "install" end test do (testpath/"test.cpp").write <<-EOS.undent #include #include 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 end ry for Irssi
summaryrefslogtreecommitdiffstats
blob: 1eb374abf2d918e89c86c9854abff8576e2bf682 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114