send 'reloadRecommended' info to IDEs (#13996)
* send 'reloadRecommended' info to IDEs * rename hint ==> hintMessage
This commit is contained in:
@@ -10,6 +10,7 @@ import 'package:flutter_tools/src/base/logger.dart';
|
||||
import 'package:flutter_tools/src/commands/daemon.dart';
|
||||
import 'package:flutter_tools/src/globals.dart';
|
||||
import 'package:flutter_tools/src/ios/ios_workflow.dart';
|
||||
import 'package:flutter_tools/src/resident_runner.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import '../src/context.dart';
|
||||
@@ -267,6 +268,23 @@ void main() {
|
||||
IOSWorkflow: () => new MockIOSWorkflow(),
|
||||
});
|
||||
});
|
||||
|
||||
group('daemon serialization', () {
|
||||
test('OperationResult', () {
|
||||
expect(
|
||||
jsonEncodeObject(OperationResult.ok),
|
||||
'{"code":0,"message":""}'
|
||||
);
|
||||
expect(
|
||||
jsonEncodeObject(new OperationResult(1, 'foo')),
|
||||
'{"code":1,"message":"foo"}'
|
||||
);
|
||||
expect(
|
||||
jsonEncodeObject(new OperationResult(0, 'foo', hintMessage: 'my hint', hintId: 'myId')),
|
||||
'{"code":0,"message":"foo","hintMessage":"my hint","hintId":"myId"}'
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
bool _notEvent(Map<String, dynamic> map) => map['event'] == null;
|
||||
|
||||
Reference in New Issue
Block a user