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

Side by Side Diff: test/generated_message_test.dart

Issue 128003003: Fix issue with importing packages where the package name included a dot (Closed) Base URL: https://github.com/dart-lang/dart-protoc-plugin.git@master
Patch Set: Update pubspec version Created 6 years, 11 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 | « pubspec.yaml ('k') | test/protos/duplicate_names_import.proto » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env dart 1 #!/usr/bin/env dart
2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 5
6 library generated_message_test; 6 library generated_message_test;
7 7
8 import 'package:protobuf/protobuf.dart'; 8 import 'package:protobuf/protobuf.dart';
9 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
10 10
11 import '../out/protos/google/protobuf/unittest.pb.dart'; 11 import '../out/protos/google/protobuf/unittest.pb.dart';
12 import '../out/protos/google/protobuf/unittest_import.pb.dart'; 12 import '../out/protos/google/protobuf/unittest_import.pb.dart';
13 import '../out/protos/google/protobuf/unittest_optimize_for.pb.dart'; 13 import '../out/protos/google/protobuf/unittest_optimize_for.pb.dart';
14 import '../out/protos/multiple_files_test.pb.dart'; 14 import '../out/protos/multiple_files_test.pb.dart';
15 import '../out/protos/nested_extension.pb.dart'; 15 import '../out/protos/nested_extension.pb.dart';
16 import '../out/protos/non_nested_extension.pb.dart'; 16 import '../out/protos/non_nested_extension.pb.dart';
17 import '../out/protos/reserved_names.pb.dart'; 17 import '../out/protos/reserved_names.pb.dart';
18 import '../out/protos/duplicate_names_import.pb.dart';
19 import '../out/protos/package1.pb.dart' as p1;
20 import '../out/protos/package2.pb.dart' as p2;
21 import '../out/protos/package3.pb.dart' as p3;
18 22
19 import 'test_util.dart'; 23 import 'test_util.dart';
20 24
21 void main() { 25 void main() {
22 final throwsInvalidProtocolBufferException = 26 final throwsInvalidProtocolBufferException =
23 throwsA(new isInstanceOf<InvalidProtocolBufferException>()); 27 throwsA(new isInstanceOf<InvalidProtocolBufferException>());
24 test('testProtosShareRepeatedArraysIfDidntChange', () { 28 test('testProtosShareRepeatedArraysIfDidntChange', () {
25 TestAllTypes value1 = new TestAllTypes() 29 TestAllTypes value1 = new TestAllTypes()
26 ..repeatedInt32.add(100) 30 ..repeatedInt32.add(100)
27 ..repeatedImportEnum.add(ImportEnum.IMPORT_BAR) 31 ..repeatedImportEnum.add(ImportEnum.IMPORT_BAR)
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 message.extensionsAreInitialized_32 = 1; 582 message.extensionsAreInitialized_32 = 1;
579 message.mergeFromMessage_33 = 1; 583 message.mergeFromMessage_33 = 1;
580 message.mergeUnknownFields_34 = 1; 584 message.mergeUnknownFields_34 = 1;
581 message.hashCode1 = 1; 585 message.hashCode1 = 1;
582 message.x = 1; 586 message.x = 1;
583 message.hasX_51 = 1; 587 message.hasX_51 = 1;
584 message.clearX_53 = 1; 588 message.clearX_53 = 1;
585 message.hasX51 = 1; 589 message.hasX51 = 1;
586 message.clearX53 = 1; 590 message.clearX53 = 1;
587 }); 591 });
592
593 test('testImportDuplicatenames', () {
594 M message = new M();
595 message.m1 = new p1.M();
596 message.m1M = new p1.M_M();
597 message.m2 = new p2.M();
598 message.m2M = new p2.M_M();
599 message.m3 = new p3.M();
600 message.m3M = new p3.M_M();
601 });
588 } 602 }
OLDNEW
« no previous file with comments | « pubspec.yaml ('k') | test/protos/duplicate_names_import.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698