anchor.diff:          expect(cmp.ngModel.untouched, control.untouched);
         });
       });
  +
       test('should set up validator', () async {
         await fixture.update((cmp) {
           expect(cmp.ngModel.errors, {'required': true});
  
positive.code:       });
      });
    });
  }
  
  @Component(
  
negative.code: 
    String loginValue;
  }
  
  @Component(
    selector: 'test',
    directives: [
      CustomEditorWithNgModelSupport,
      NgModel,
    ],
    template: '''
      <custom-editor-with-ng-model [(ngModel)]="value">
      </custom-editor-with-ng-model>
    ''',
  )
  class NgModelWithCheckBindingTest {
    String value;
  }
  
  @Component(
    selector: 'custom-editor-with-ng-model',
    template: '',
  )
  class CustomEditorWithNgModelSupport implements ControlValueAccessor<String> {
    final NgControl _ngControl;
    ChangeFunction<String> _onChange;
  
    CustomEditorWithNgModelSupport(this._ngControl) {
      _ngControl.valueAccessor = this;
    }
  
    @override
    void writeValue(String value) {
      // Example of bad behavior. We are, synchronously, receiving a write coming
      // from ngModel.model=, and synchronously, responding back to ngModel, which
      // in turn, synchronously, talks back via StreamController(sync: true).
      if (value == 'Hello') {
        value = 'Goodbye';
        _onChange(value);
      }
    }
  
    @override
    void onDisabledChanged(_) {}
  
    @override
    void registerOnChange(ChangeFunction<String> function) {
      _onChange = function;
    }
  
    @override
    void registerOnTouched(_) {}
  }
  