anchor.diff:  
       // Test the pull up and pull down resistor settings
       // on a disconnected pin
  -    test('pull up/down', () async {
  +    test('pull up/down', () {
         var pin = gpio.pin(4, input);
         expect(pin.pull, pullOff);
         pin.pull = pullUp;
  -      await _delay(1);
  -      expect(pin.value, 1);
  +      _assertValue(pin, 1);
         expect(pin.pull, pullUp);
         pin.pull = null;
         expect(pin.pull, pullOff);
         pin.pull = pullDown;
  -      await _delay(1);
  -      expect(pin.value, 0);
  +      _assertValue(pin, 0);
         expect(pin.pull, pullDown);
         pin.pull = pullOff;
         expect(pin.pull, pullOff);
  
positive.code:   int thresholdUp;
    for (int pulseWidth = 0; pulseWidth <= 1024; pulseWidth += 10) {
      ledPin.pulseWidth = pulseWidth;
      if (thresholdUp == null) await _delay(1);
      int value = sensorPin.value;
      if (thresholdUp == null && value == 1) thresholdUp = pulseWidth;
    }
  
negative.code:   int thresholdDown;
    for (int pulseWidth = 1024; pulseWidth >= 0; pulseWidth -= 10) {
      ledPin.pulseWidth = pulseWidth;
      if (thresholdDown == null) await _delay(5);
      int value = sensorPin.value;
      if (thresholdDown == null && value == 0) thresholdDown = pulseWidth;
    }
  