Will "unittest_custom_options.proto" by updated in 2.0.3 to test 
EnumValueOptions, or will there be a new proto file?

I have used your hint about them being like field options to implement 
the following passing unit test for my Haskell version:
> pamac-cek10:protobuf chrisk$ diff -u unittest_custom_options.proto 
> unittest_custom_options_cek.proto
> --- unittest_custom_options.proto    2008-10-06 09:34:07.000000000 +0100
> +++ unittest_custom_options_cek.proto    2008-12-01 18:18:34.000000000 
> +0000
> @@ -34,6 +34,7 @@
>  //
>  // A proto file used to test the "custom options" feature of proto2.
>  
> +// XXX CEK : changed to add enum value options as a test
>  
>  // A custom file option (defined below).
>  option (file_opt1) = 9876543210;
> @@ -81,6 +82,10 @@
>    optional MethodOpt1 method_opt1 = 7890860;
>  }
>  
> +extend google.protobuf.EnumValueOptions {
> +  repeated int32 enumval_opt1 = 818181;
> +}
> +
>  // A test message with custom options at all possible locations (and 
> also some
>  // regular options, to make sure they interact nicely).
>  message TestMessageWithCustomOptions {
> @@ -94,7 +99,7 @@
>    enum AnEnum {
>      option (enum_opt1) = -789;
>  
> -    ANENUM_VAL1 = 1;
> +    ANENUM_VAL1 = 1 
> [(enumval_opt1)=100,(enumval_opt1)=101,(enumval_opt1)=102];
>      ANENUM_VAL2 = 2;
>    }
>  }
Parsing note: There must be at least one assignment between the square 
brackets, like field options.  So
     ANENUM_VAL2 = 2 [];
would be invalid.

I will hold off polishing and releasing a new version until I can test 
against the official 2.0.3 code.

Cheers,
  Chris


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to