Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: test/service_test.dart

Issue 1829573002: Fix all strong mode warnings in protoc-plugin (Closed) Base URL: git@github.com:dart-lang/dart-protoc-plugin.git@master
Patch Set: regenerate pb.dart files Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/message_test.dart ('k') | test/validate_fail_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library service_test; 1 library service_test;
2 2
3 import 'dart:async' show Future; 3 import 'dart:async' show Future;
4 4
5 import 'package:protobuf/protobuf.dart'; 5 import 'package:protobuf/protobuf.dart';
6 import 'package:test/test.dart'; 6 import 'package:test/test.dart';
7 7
8 import '../out/protos/service.pb.dart' as pb; 8 import '../out/protos/service.pb.dart' as pb;
9 import '../out/protos/service2.pb.dart' as pb2; 9 import '../out/protos/service2.pb.dart' as pb2;
10 import '../out/protos/service3.pb.dart' as pb3; 10 import '../out/protos/service3.pb.dart' as pb3;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 var map = service.$messageJson; 102 var map = service.$messageJson;
103 expect(map.keys, [ 103 expect(map.keys, [
104 '.SearchRequest', 104 '.SearchRequest',
105 '.SearchResponse', 105 '.SearchResponse',
106 '.service2.SearchRequest', 106 '.service2.SearchRequest',
107 '.service2.SearchResponse', 107 '.service2.SearchResponse',
108 '.service3.SearchResult', 108 '.service3.SearchResult',
109 ]); 109 ]);
110 110
111 String readMessageName(fqname) { 111 String readMessageName(fqname) {
112 var descriptor = new DescriptorProto() 112 var json = map[fqname] as Map<String, dynamic>;
113 ..mergeFromJsonMap(map[fqname]); 113 var descriptor = new DescriptorProto()..mergeFromJsonMap(json);
114 return descriptor.name; 114 return descriptor.name;
115 } 115 }
116 expect(readMessageName('.SearchRequest'), "SearchRequest"); 116 expect(readMessageName('.SearchRequest'), "SearchRequest");
117 expect(readMessageName('.service2.SearchRequest'), "SearchRequest"); 117 expect(readMessageName('.service2.SearchRequest'), "SearchRequest");
118 expect(readMessageName('.service3.SearchResult'), "SearchResult"); 118 expect(readMessageName('.service3.SearchResult'), "SearchResult");
119 }); 119 });
120 } 120 }
OLDNEW
« no previous file with comments | « test/message_test.dart ('k') | test/validate_fail_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698