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

Side by Side Diff: test/unknown_field_set_test.dart

Issue 25708003: Update the protocol buffer compiler plugin to use Int64 from the fixnum package (Closed) Base URL: https://github.com/dart-lang/dart-protoc-plugin.git@master
Patch Set: Created 7 years, 2 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
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 unknown_field_set_test; 6 library unknown_field_set_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
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 expect(optionalInt32.varints[0], expect64(testAllTypes.optionalInt32)); 62 expect(optionalInt32.varints[0], expect64(testAllTypes.optionalInt32));
63 }); 63 });
64 64
65 test('testFixed32', () { 65 test('testFixed32', () {
66 UnknownFieldSetField optionalFixed32 = getField('optionalFixed32'); 66 UnknownFieldSetField optionalFixed32 = getField('optionalFixed32');
67 expect(optionalFixed32.fixed32s[0], testAllTypes.optionalFixed32); 67 expect(optionalFixed32.fixed32s[0], testAllTypes.optionalFixed32);
68 }); 68 });
69 69
70 test('testFixed64', () { 70 test('testFixed64', () {
71 UnknownFieldSetField optionalFixed64 = getField('optionalFixed64'); 71 UnknownFieldSetField optionalFixed64 = getField('optionalFixed64');
72 expect(optionalFixed64.fixed64s[0].getUint32(0), 72 expect(optionalFixed64.fixed64s[0], testAllTypes.optionalFixed64);
73 testAllTypes.optionalFixed64.getUint32(0));
74 expect(optionalFixed64.fixed64s[0].getUint32(4),
75 testAllTypes.optionalFixed64.getUint32(4));
76 }); 73 });
77 74
78 test('testLengthDelimited', () { 75 test('testLengthDelimited', () {
79 UnknownFieldSetField optionalBytes = getField('optionalBytes'); 76 UnknownFieldSetField optionalBytes = getField('optionalBytes');
80 expect(optionalBytes.lengthDelimited[0], testAllTypes.optionalBytes); 77 expect(optionalBytes.lengthDelimited[0], testAllTypes.optionalBytes);
81 }); 78 });
82 79
83 test('testGroup', () { 80 test('testGroup', () {
84 int tagNumberA = new TestAllTypes_OptionalGroup().getTagNumber('a'); 81 int tagNumberA = new TestAllTypes_OptionalGroup().getTagNumber('a');
85 expect(tagNumberA != null, isTrue); 82 expect(tagNumberA != null, isTrue);
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 ..addField(1, new UnknownFieldSetField()..addLengthDelimited([1, 2])); 326 ..addField(1, new UnknownFieldSetField()..addLengthDelimited([1, 2]));
330 UnknownFieldSet f2 = new UnknownFieldSet() 327 UnknownFieldSet f2 = new UnknownFieldSet()
331 ..addField(1, new UnknownFieldSetField()..addLengthDelimited([2, 1])); 328 ..addField(1, new UnknownFieldSetField()..addLengthDelimited([2, 1]));
332 329
333 _checkEqualsIsConsistent(f1); 330 _checkEqualsIsConsistent(f1);
334 _checkEqualsIsConsistent(f2); 331 _checkEqualsIsConsistent(f2);
335 332
336 _checkNotEqual(f1, f2); 333 _checkNotEqual(f1, f2);
337 }); 334 });
338 } 335 }
OLDNEW
« pubspec.yaml ('K') | « test/test_util.dart ('k') | test/validate_fail_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698