Spaces:
Running
Running
Upload assignment2.html with huggingface_hub
Browse files- assignment2.html +2 -2
assignment2.html
CHANGED
|
@@ -141,7 +141,7 @@
|
|
| 141 |
<button data-tab="q1" class="active">Q1 · Decision Table</button>
|
| 142 |
<button data-tab="q2">Q2 · Control-Flow Graph</button>
|
| 143 |
<button data-tab="q3">Q3 · Loop Boundary</button>
|
| 144 |
-
<button data-tab="q4">Q4 ·
|
| 145 |
<button data-tab="q5">Q5 · Halstead</button>
|
| 146 |
</div>
|
| 147 |
<div class="panes">
|
|
@@ -207,7 +207,7 @@
|
|
| 207 |
<!-- ============ Q4 ============ -->
|
| 208 |
<section class="pane" data-tab="q4">
|
| 209 |
<details class="refbox" open><summary>Reference function — binary_search (used in Q2–Q4)</summary><pre class="reffn"></pre></details>
|
| 210 |
-
<h2>Q4
|
| 211 |
<p class="muted">The Q3 suite reaches loop-boundary coverage, but coverage does not guarantee fault detection. This question asks you to demonstrate that gap on the <code>binary_search</code> function above.</p>
|
| 212 |
<p>(a) Introduce <b>exactly one</b> single-line bug into <code>binary_search</code> so that <b>all three Q3 tests still pass</b> (the bug is invisible to the Q3 suite).
|
| 213 |
(b) Provide <b>one</b> extra test case — with <code>target</code>, <code>key</code>, the <b>original output</b>, and the <b>variant output</b> — that <b>distinguishes</b> the variant from the original (original passes it, variant fails).</p>
|
|
|
|
| 141 |
<button data-tab="q1" class="active">Q1 · Decision Table</button>
|
| 142 |
<button data-tab="q2">Q2 · Control-Flow Graph</button>
|
| 143 |
<button data-tab="q3">Q3 · Loop Boundary</button>
|
| 144 |
+
<button data-tab="q4">Q4 · Coverage and Bug</button>
|
| 145 |
<button data-tab="q5">Q5 · Halstead</button>
|
| 146 |
</div>
|
| 147 |
<div class="panes">
|
|
|
|
| 207 |
<!-- ============ Q4 ============ -->
|
| 208 |
<section class="pane" data-tab="q4">
|
| 209 |
<details class="refbox" open><summary>Reference function — binary_search (used in Q2–Q4)</summary><pre class="reffn"></pre></details>
|
| 210 |
+
<h2>Q4 Coverage and Bug <span class="pts">[6 pts] · playground</span></h2>
|
| 211 |
<p class="muted">The Q3 suite reaches loop-boundary coverage, but coverage does not guarantee fault detection. This question asks you to demonstrate that gap on the <code>binary_search</code> function above.</p>
|
| 212 |
<p>(a) Introduce <b>exactly one</b> single-line bug into <code>binary_search</code> so that <b>all three Q3 tests still pass</b> (the bug is invisible to the Q3 suite).
|
| 213 |
(b) Provide <b>one</b> extra test case — with <code>target</code>, <code>key</code>, the <b>original output</b>, and the <b>variant output</b> — that <b>distinguishes</b> the variant from the original (original passes it, variant fails).</p>
|