github.com/Finschia/finschia-sdk@v0.48.1/server/grpc/gogoreflection/fix_registration_test.go (about)

     1  package gogoreflection
     2  
     3  import (
     4  	"testing"
     5  
     6  	"google.golang.org/protobuf/runtime/protoimpl"
     7  )
     8  
     9  func TestRegistrationFix(t *testing.T) {
    10  	res := getFileDescriptor("gogoproto/gogo.proto")
    11  	rawDesc, err := decompress(res)
    12  	if err != nil {
    13  		t.Fatal(err)
    14  	}
    15  	fd := protoimpl.DescBuilder{
    16  		RawDescriptor: rawDesc,
    17  	}.Build()
    18  
    19  	if fd.File.Extensions().Len() == 0 {
    20  		t.Fatal("unexpected parsing")
    21  	}
    22  }