Unverified Commit 6d7ecab2 authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Minor improvements to analyzer test naming (#21234)

Clarify the intent of these tests.
parent 5a5ebde3
...@@ -70,10 +70,11 @@ void main() { ...@@ -70,10 +70,11 @@ void main() {
OperatingSystemUtils: () => os OperatingSystemUtils: () => os
}); });
testUsingContext('analyze', () async { testUsingContext('Returns no errors when source is error-free', () async {
const String contents = "StringBuffer bar = StringBuffer('baz');"; const String contents = "StringBuffer bar = StringBuffer('baz');";
tempDir.childFile('main.dart').writeAsStringSync(contents); tempDir.childFile('main.dart').writeAsStringSync(contents);
server = new AnalysisServer(dartSdkPath, <String>[tempDir.path]); server = new AnalysisServer(dartSdkPath, <String>[tempDir.path]);
int errorCount = 0; int errorCount = 0;
final Future<bool> onDone = server.onAnalyzing.where((bool analyzing) => analyzing == false).first; final Future<bool> onDone = server.onAnalyzing.where((bool analyzing) => analyzing == false).first;
server.onErrors.listen((FileAnalysisErrors errors) { server.onErrors.listen((FileAnalysisErrors errors) {
......
...@@ -162,7 +162,7 @@ void bar() { ...@@ -162,7 +162,7 @@ void bar() {
} }
}); });
testUsingContext('analyze', () async { testUsingContext('returns no issues when source is error-free', () async {
const String contents = ''' const String contents = '''
StringBuffer bar = StringBuffer('baz'); StringBuffer bar = StringBuffer('baz');
'''; ''';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment