mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Use Protobuf's AbslStringify to stringify protos.
Protobuf DebugString APIs will be deprecated. PiperOrigin-RevId: 543355252 Change-Id: Ieea97e87fc592c023cb2f965be3926f52192ffe4
This commit is contained in:
parent
64ac98bf4d
commit
a94b17d821
|
@ -56,7 +56,7 @@ TEST(StringopTest, ProtobufStringDuplication) {
|
|||
}
|
||||
|
||||
SAPI_ASSIGN_OR_RETURN(auto pb_result, pp->GetMessage());
|
||||
LOG(INFO) << "Result PB: " << pb_result.DebugString();
|
||||
LOG(INFO) << "Result PB: " << pb_result;
|
||||
TRANSACTION_FAIL_IF_NOT(pb_result.output() == "HelloHello",
|
||||
"Incorrect output");
|
||||
return absl::OkStatus();
|
||||
|
@ -77,7 +77,7 @@ TEST(StringopTest, ProtobufStringReversal) {
|
|||
EXPECT_THAT(return_value, Ne(0)) << "pb_reverse_string() failed";
|
||||
|
||||
SAPI_ASSERT_OK_AND_ASSIGN(auto pb_result, pp->GetMessage());
|
||||
LOG(INFO) << "Result PB: " << pb_result.DebugString();
|
||||
LOG(INFO) << "Result PB: " << pb_result;
|
||||
EXPECT_THAT(pb_result.output(), StrEq("olleH"));
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,6 @@
|
|||
#include "sandboxed_api/examples/sum/sum_params.pb.h"
|
||||
|
||||
extern "C" int sumproto(const sumsapi::SumParamsProto* params) {
|
||||
LOG(INFO) << "Param is " << params->DebugString();
|
||||
LOG(INFO) << "Param is " << *params;
|
||||
return params->a() + params->b() + params->c();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user