]>
Commit | Line | Data |
---|---|---|
f67539c2 TL |
1 | package org.apache.thrift.protocol; |
2 | ||
3 | import org.apache.thrift.TDeserializer; | |
4 | import org.apache.thrift.TSerializer; | |
5 | ||
6 | import thrift.test.TupleProtocolTestStruct; | |
7 | ||
8 | ||
9 | public class TestTTupleProtocol extends ProtocolTestBase { | |
10 | ||
11 | @Override | |
12 | protected boolean canBeUsedNaked() { | |
13 | return false; | |
14 | } | |
15 | ||
16 | @Override | |
17 | protected TProtocolFactory getFactory() { | |
18 | return new TTupleProtocol.Factory(); | |
19 | } | |
20 | ||
21 | public void testBitsetLengthIssue() throws Exception { | |
22 | final TupleProtocolTestStruct t1 = new TupleProtocolTestStruct(); | |
23 | t1.setField1(0); | |
24 | t1.setField2(12); | |
25 | new TDeserializer(new TTupleProtocol.Factory()).deserialize(new TupleProtocolTestStruct(), new TSerializer(new TTupleProtocol.Factory()).serialize(t1)); | |
26 | } | |
27 | } |