anchor.diff:            trace == null ? '' : trace.toString());
       }
     } catch (var e, var trace) {
  -    if (_state != _UNCAUGHT_ERROR) {
  +    if (_state == _RUNNING_TEST) {
  +      // If a random exception is thrown from within a test, we consider that
  +      // a test failure too. A test case implicitly has an expectation that it
  +      // will run to completion without an uncaught exception being thrown.
  +      _tests[_currentTest].fail('Caught $e',
  +          trace == null ? '' : trace.toString());
  +    } else if (_state != _UNCAUGHT_ERROR) {
         _tests[_currentTest].error('Caught $e',
             trace == null ? '' : trace.toString());
       }
  
positive.code:     testCase.error(
          'Async tests must wait for at least one callback ', '');
    }
  }
  
  /** Sentinel value for [_SpreadArgsHelper]. */
  
negative.code: final _FAIL  = 'fail';
  final _ERROR = 'error';
  
  /** If set, then all other test cases will be ignored. */
  TestCase _soloTest;
  
  /** Creates an expectation for the given value. */
  Expectation expect(value) => new Expectation(value);
  
  /**
   * Evaluates the [function] and validates that it throws an exception. If
   * [callback] is provided, then it will be invoked with the thrown exception.
   * The callback may do any validation it wants. In addition, if it returns
   * `false`, that also indicates an expectation failure.
   */
  void expectThrow(function, [bool callback(exception)]) {
    bool threw = false;
    try {
      function();
    } catch (var e) {
      threw = true;
  
      // Also let the callback look at it.
      if (callback != null) {
        var result = callback(e);
  
        // If the callback explicitly returned false, treat that like an
        // expectation too. (If it returns null, though, don't.)
        if (result == false) {
          _fail('Exception:\n$e\ndid not match expectation.');
        }
      }
    }
  
    if (threw != true) _fail('An expected exception was not thrown.');
  }
  
  /**
  