-
Notifications
You must be signed in to change notification settings - Fork 83
Migrate a handful of tests to null-safety #1715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with some comments.
}); | ||
|
||
test('set breakpoint', () async { | ||
final line = await context.findBreakpointLine( | ||
'printLocal', isolate.id, mainScript); | ||
'printLocal', isolate.id!, mainScript); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we declare an isolateId
variable instead of asserting on isolate.id!
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
final bp = await service.addBreakpointWithScriptUri( | ||
isolate.id, mainScript.uri, line); | ||
isolate.id!, mainScript.uri!, line); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the same for mainScript.uri?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
}); | ||
|
||
tearDown(() async { | ||
await service.resume(isolate.id); | ||
await service.resume(isolate.id!); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar for isolate.id here, as it looks like it is used in many places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
expect( | ||
instance, | ||
isA<Instance>().having( | ||
(instance) => instance.classRef.name, | ||
(instance) => instance.classRef!.name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should add an expectation of the variableName being non-null here as well, WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Migrates the following tests to null-safety: