diff --git a/thrift/conformance/data/PatchGenerator.cpp b/thrift/conformance/data/PatchGenerator.cpp index 316b7607dab..1cc7b0243d1 100644 --- a/thrift/conformance/data/PatchGenerator.cpp +++ b/thrift/conformance/data/PatchGenerator.cpp @@ -520,15 +520,15 @@ Test createListSetPatchTest( prependSetCase.name() = makeTestName(value, "insert"); prependSetCase.test().emplace().objectPatch_ref() = makeContainerInsertTC(registry, protocol, value); + } else { + auto patchValue = value.value; + op::clear(patchValue); + auto& appendCase = test.testCases()->emplace_back(); + appendCase.name() = makeTestName(value, "append"); + appendCase.test().emplace().objectPatch_ref() = + makeContainerAppendTC( + registry, protocol, value.value, patchValue); } - - auto patchValue = value.value; - op::clear(patchValue); - auto& appendCase = test.testCases()->emplace_back(); - appendCase.name() = makeTestName(value, "append"); - appendCase.test().emplace().objectPatch_ref() = - makeContainerAppendTC( - registry, protocol, value.value, patchValue); } });