You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<divclass="line"><spanclass="keywordtype">int</span> value = 5;</div>
103
103
<divclass="line"> EXPECT_EQ(5, value);</div>
104
104
<divclass="line">}</div>
105
+
</div><!-- fragment --><p>and another one based on the <aclass="el" href="classFish.html" title="Represents the position and velocity of a Shape on an infinite x-y grid.">Fish</a> class:</p>
<divclass="ttc" id="aclassFish_html"><divclass="ttname"><ahref="classFish.html">Fish</a></div><divclass="ttdoc">Represents the position and velocity of a Shape on an infinite x-y grid.</div><divclass="ttdef"><b>Definition:</b><ahref="fish_8h_source.html#l00009">fish.h:9</a></div></div>
121
+
<divclass="ttc" id="aclassShape_html"><divclass="ttname"><ahref="classShape.html">Shape</a></div><divclass="ttdoc">Represents an ASCII-art drawing and its corresponding bounding box.</div><divclass="ttdef"><b>Definition:</b><ahref="shape_8h_source.html#l00007">shape.h:7</a></div></div>
122
+
<divclass="ttc" id="aclassStringScreen_html"><divclass="ttname"><ahref="classStringScreen.html">StringScreen</a></div><divclass="ttdoc">Serializable implementation of Screen using a 2D character buffer.</div><divclass="ttdef"><b>Definition:</b><ahref="string-screen_8h_source.html#l00013">string-screen.h:13</a></div></div>
105
123
</div><!-- fragment --><p>All the tests in a file should be part of the same <em>test case</em>, meaning the first argument to each UTEST macro (<code>SampleTestSuite</code>, in this example) should match. It's conventional to name the test case after the class being tested, for example <code>TankTests</code> or <code>FishTests</code>.</p>
106
124
<p>You should expect to write many tests for each class. Although the code is relatively simple, there's still a lot that could go wrong, and we'll be running your unit tests to make sure they catch a variety of issues (see next section). The files you provide will likely contain several hundred lines of code in total, although some of this will be <code>UTEST()</code> macros and setup code that's common to multiple tests.</p>
0 commit comments