1*c8d645caSAndroid Build Coastguard Worker# Test that the decoder properly handles unknown fields in the input. 2*c8d645caSAndroid Build Coastguard Worker 3*c8d645caSAndroid Build Coastguard WorkerImport("env") 4*c8d645caSAndroid Build Coastguard Worker 5*c8d645caSAndroid Build Coastguard Workerdec = env.GetBuildPath('$BUILD/basic_buffer/${PROGPREFIX}decode_buffer${PROGSUFFIX}') 6*c8d645caSAndroid Build Coastguard Workerenv.RunTest('person_with_extra_field.output', [dec, "person_with_extra_field.pb"]) 7*c8d645caSAndroid Build Coastguard Workerenv.Compare(["person_with_extra_field.output", "person_with_extra_field.expected"]) 8*c8d645caSAndroid Build Coastguard Worker 9*c8d645caSAndroid Build Coastguard Workerdec = env.GetBuildPath('$BUILD/basic_stream/${PROGPREFIX}decode_stream${PROGSUFFIX}') 10*c8d645caSAndroid Build Coastguard Workerenv.RunTest('person_with_extra_field_stream.output', [dec, "person_with_extra_field.pb"]) 11*c8d645caSAndroid Build Coastguard Workerenv.Compare(["person_with_extra_field_stream.output", "person_with_extra_field.expected"]) 12*c8d645caSAndroid Build Coastguard Worker 13*c8d645caSAndroid Build Coastguard Worker# This uses the backwards compatibility alltypes test, so that 14*c8d645caSAndroid Build Coastguard Worker# alltypes_with_extra_fields.pb doesn't have to be remade so often. 15*c8d645caSAndroid Build Coastguard Workerdec2 = env.GetBuildPath('$BUILD/backwards_compatibility/${PROGPREFIX}decode_legacy${PROGSUFFIX}') 16*c8d645caSAndroid Build Coastguard Workerenv.RunTest('alltypes_with_extra_fields.output', [dec2, 'alltypes_with_extra_fields.pb']) 17