blob: f39ca65da16ff1cd1c4ccc69153051685dc705b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
package org.apache.thrift.protocol;
import org.apache.thrift.TDeserializer;
import org.apache.thrift.TSerializer;
import org.junit.jupiter.api.Test;
import thrift.test.TupleProtocolTestStruct;
public class TestTTupleProtocol extends ProtocolTestBase {
@Override
protected boolean canBeUsedNaked() {
return false;
}
@Override
protected TProtocolFactory getFactory() {
return new TTupleProtocol.Factory();
}
@Test
public void testBitsetLengthIssue() throws Exception {
final TupleProtocolTestStruct t1 = new TupleProtocolTestStruct();
t1.setField1(0);
t1.setField2(12);
new TDeserializer(new TTupleProtocol.Factory())
.deserialize(
new TupleProtocolTestStruct(),
new TSerializer(new TTupleProtocol.Factory()).serialize(t1));
}
}
|