><span class="psymbol">shouldThrow</span>(<span class="keyword">delegate</span>() {

}, <span class="string_literal">"boom!"</span>);

<span class="comment">// Will throw an exception like "AssertError@test/example.d(7): Exception was not thrown. Expected one.
</span><span class="psymbol">shouldThrow</span>(<span class="keyword">delegate</span>() {

});
</code></li>
      </ol>
    </div>
  </div>
</section>

  </p>
</div>
</section>

</div>

</li><li class="ddoc_member">
  <div class="