go.starlark.net@v0.0.0-20231101134539-556fd59b42f6/starlark/testdata/proto.star (about)

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