flutter/packages/flutter/test/gestures/recognizer_test.dart
Adam Barth a60fefc131 Improve test coverage (#5473)
These tests should hit some previously untested lines.
2016-08-17 18:18:07 -07:00

28 lines
757 B
Dart

// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter/gestures.dart';
class TestGestureRecognizer extends GestureRecognizer {
@override
String toString() => 'toString content';
@override
void addPointer(PointerDownEvent event) {}
@override
void acceptGesture(int pointer) {}
@override
void rejectGesture(int pointer) {}
}
void main() {
test('GestureRecognizer.toStringShort defaults to toString', () {
TestGestureRecognizer recognizer = new TestGestureRecognizer();
expect(recognizer.toStringShort(), equals(recognizer.toString()));
});
}