Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix unimplemented test
  • Loading branch information
LouiseHsu committed Nov 28, 2023
commit 38c41e292439772eaadfa9d9e80a5884adfba82c
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,19 @@ import 'package:pointer_interceptor_platform_interface/pointer_interceptor_platf
void main() {
TestWidgetsFlutterBinding.ensureInitialized();

test('Default implementation of PointerInterceptor should return child', () {
final PointerInterceptorPlatform pointerInterceptorPlatform =
PointerInterceptorPlatform.instance;
test(
'Default implementation of PointerInterceptorPlatform should throw unimplemented error',
() {
final PointerInterceptorPlatform unimplementedPointerInterceptorPlatform =
UnimplementedPointerInterceptorPlatform();

final Container testChild = Container();
expect(pointerInterceptorPlatform.buildWidget(child: testChild), testChild);
expect(
() => unimplementedPointerInterceptorPlatform.buildWidget(
child: testChild),
throwsUnimplementedError);
});
}

class UnimplementedPointerInterceptorPlatform
extends PointerInterceptorPlatform {}