14 lines
386 B
Dart
14 lines
386 B
Dart
import 'dart:convert';
|
|
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:jinzhi_flutter_app/common/network/protobuf_wire_reader.dart';
|
|
|
|
void main() {
|
|
test('protobuf strings are decoded as UTF-8', () {
|
|
final value = utf8.encode('商城');
|
|
final message = ProtobufWireMessage(<int>[10, value.length, ...value]);
|
|
|
|
expect(message.string(1), '商城');
|
|
});
|
|
}
|