OLD | NEW |
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 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 new TestExtremeDefaultValues(); | 140 new TestExtremeDefaultValues(); |
141 | 141 |
142 expect(message.utf8String, '\u1234'); | 142 expect(message.utf8String, '\u1234'); |
143 expect(message.infDouble, same(double.INFINITY)); | 143 expect(message.infDouble, same(double.INFINITY)); |
144 expect(message.negInfDouble, same(double.NEGATIVE_INFINITY)); | 144 expect(message.negInfDouble, same(double.NEGATIVE_INFINITY)); |
145 expect(message.nanDouble, same(double.NAN)); | 145 expect(message.nanDouble, same(double.NAN)); |
146 expect(message.infFloat, same(double.INFINITY)); | 146 expect(message.infFloat, same(double.INFINITY)); |
147 expect(message.negInfFloat, same(double.NEGATIVE_INFINITY)); | 147 expect(message.negInfFloat, same(double.NEGATIVE_INFINITY)); |
148 expect(message.nanFloat, same(double.NAN)); | 148 expect(message.nanFloat, same(double.NAN)); |
149 expect(message.cppTrigraph, '? ? ?? ?? ??? ??/ ??-'); | 149 expect(message.cppTrigraph, '? ? ?? ?? ??? ??/ ??-'); |
| 150 expect(message.smallInt64.toRadixString(16).toUpperCase(), |
| 151 '-7FFFFFFFFFFFFFFF'); |
150 }); | 152 }); |
151 | 153 |
152 test('testClear', () { | 154 test('testClear', () { |
153 TestAllTypes message = new TestAllTypes(); | 155 TestAllTypes message = new TestAllTypes(); |
154 | 156 |
155 assertClear(message); | 157 assertClear(message); |
156 setAllFields(message); | 158 setAllFields(message); |
157 message.clear(); | 159 message.clear(); |
158 assertClear(message); | 160 assertClear(message); |
159 }); | 161 }); |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 message.m2M = new p2.M_M(); | 713 message.m2M = new p2.M_M(); |
712 message.m3 = new p3.M(); | 714 message.m3 = new p3.M(); |
713 message.m3M = new p3.M_M(); | 715 message.m3M = new p3.M_M(); |
714 }); | 716 }); |
715 | 717 |
716 test('testToplevel', () { | 718 test('testToplevel', () { |
717 t.M message = new t.M(); | 719 t.M message = new t.M(); |
718 message.t = new T(); | 720 message.t = new T(); |
719 }); | 721 }); |
720 } | 722 } |
OLD | NEW |