~bduggan/raku-protobuf

ref: 1111fa768f7a83817e7b58bc8a8e0d5ba43739eb raku-protobuf/t/04-nested.rakutest -rw-r--r-- 540 bytes
1111fa76Brian Duggan repeated 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
use Protobuf;
use Test;

my $m = parse-proto($?FILE.IO.parent.parent.child('eg/nested.proto').slurp);
my $service = $m.services[0];
is $service.endpoints[1].request.fields[0].type.name, 'HelloRequest', 'type name';
is $service.endpoints[1].request.fields[0].type.fields[0].name, 'name', 'type has nested attributes';
nok $service.endpoints[1].request.fields[0].type.repeated, 'not repeated';

is $service.endpoints[2].request.fields[0].name, 'holas', 'holas';
ok $service.endpoints[2].request.fields[0].repeated, 'repeated';

done-testing;