[ 
https://issues.apache.org/jira/browse/THRIFT-819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14957288#comment-14957288
 ] 

Nobuaki Sukegawa commented on THRIFT-819:
-----------------------------------------

By "test strings for utf8" you mean Thrift const values containing multi-byte 
or escaped characters ?
Although it seems a separete issue than this one, it's true that string tests 
with such characters are a bit sparse.

As to the protocol/transport enum, I think it's diffcult to reuse enum values 
because we need much flexibility here.
Besides the difficulty discussed above, there are also implementation variants:
E.g., we have in tests.json "binary:accel" and "framed:fastframed" where 
"accel" part can be any arbitrary string.

> add Enumeration for protocol, transport and server types
> --------------------------------------------------------
>
>                 Key: THRIFT-819
>                 URL: https://issues.apache.org/jira/browse/THRIFT-819
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Library
>            Reporter: Roger Meier
>            Assignee: Roger Meier
>            Priority: Minor
>             Fix For: 1.0
>
>         Attachments: THRIFT-819.patch
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> I would like to have Enumeration's for protocol, transport and server types.
> I'm doing some testing stuff, and using types for the different parameter's 
> would make it much more comfortable to work with, e.g.
> {code}
>   // Dispatcher
>   shared_ptr<TProtocolFactory> protocolFactory;
>   if (protocol_type == PROTOCOL_JSON) {
>     shared_ptr<TProtocolFactory> jsonProtocolFactory(new 
> TJSONProtocolFactory());
>     protocolFactory = jsonProtocolFactory;
>   } else
>   {
>     shared_ptr<TProtocolFactory> binaryProtocolFactory(new 
> TBinaryProtocolFactory());
>     protocolFactory = binaryProtocolFactory;
>   }
> {code}
> aligning these enums across all languages might be another benefit.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to