title: In Dart, how to verify a void method that does not throw exception in unit tests?
body: <p>I am implementing some data verification library in Dart. The validating method has <code>void</code> return type and throws exceptions on errors. The code below shows an example.</p>
  <pre><code>import 'package:quiver/check.dart';
      
  void validate(int value) {
      checkArgument(value &gt;= 0 &amp;&amp; value &lt;= 100);
  }
  </code></pre>
  <p>In unit tests, I could use following code to test the exception case for invalid input:</p>
  <pre><code>expect(() =&gt; validate(-1), throwsArgumentError);
  </code></pre>
  <p>However, how to verify that the method does not throw exception for a valid input?</p>