...

Text file src/go.starlark.net/starlark/testdata/proto.star

Documentation: go.starlark.net/starlark/testdata

     1# Tests of the experimental 'lib/proto' module.
     2
     3load("assert.star", "assert")
     4load("proto.star", "proto")
     5
     6schema = proto.file("google/protobuf/descriptor.proto")
     7
     8m = schema.FileDescriptorProto(name = "somename.proto", dependency = ["a", "b", "c"])
     9assert.eq(type(m), "proto.Message")
    10assert.eq(m.name, "somename.proto")
    11assert.eq(list(m.dependency), ["a", "b", "c"])
    12m.dependency = ["d", "e"]
    13assert.eq(list(m.dependency), ["d", "e"])
    14

View as plain text