g value only for negative inputs and your test cases only tested positive inputs, you would receive all <code class="language-c++ highlighter-rouge"><span class="n">Correct</span></code> results and no mention of the lurking defect. Or perhaps you took a shortcut and wrote your test cases to only confirm that <code class="language-c++ highlighter-rouge"><span class="n">square</span><span class="p">()</span></code> returned a non-negative value (e.g. <code class="language-c++ highlighter-rouge"><span class="