From 7c931aa9c787583e367e2c308e3faef496e00d92 Mon Sep 17 00:00:00 2001 From: Eiden Kim Date: Thu, 1 Jun 2023 12:08:41 -0700 Subject: [PATCH] Changed number (1/0) to true/false in Connections Dump() PiperOrigin-RevId: 537092962 --- connections/implementation/client_proxy.cc | 8 ++++---- connections/implementation/client_proxy_test.cc | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/connections/implementation/client_proxy.cc b/connections/implementation/client_proxy.cc index 2d3ecf10..c839efb1 100644 --- a/connections/implementation/client_proxy.cc +++ b/connections/implementation/client_proxy.cc @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -866,15 +867,14 @@ std::string ClientProxy::Dump() { sstream << "Nearby Connections State" << std::endl; sstream << " Client ID: " << GetClientId() << std::endl; sstream << " Local Endpoint ID: " << GetLocalEndpointId() << std::endl; + sstream << std::boolalpha; sstream << " High Visibility Mode: " << high_vis_mode_ << std::endl; sstream << " Is Advertising: " << IsAdvertising() << std::endl; + sstream << " Is Discovering: " << IsDiscovering() << std::endl; + sstream << std::noboolalpha; sstream << " Advertising Service ID: " << GetAdvertisingServiceId() << std::endl; - // TODO(deling): AdvertisingOptions - sstream << " Is Discovering: " << IsDiscovering() << std::endl; sstream << " Discovery Service ID: " << GetDiscoveryServiceId() << std::endl; - // TODO(deling): DiscoveryOptions - sstream << " Connections: " << std::endl; for (auto it = connections_.begin(); it != connections_.end(); ++it) { // TODO(deling): write Connection.ToString() diff --git a/connections/implementation/client_proxy_test.cc b/connections/implementation/client_proxy_test.cc index 0abedeb4..0e6a1b80 100644 --- a/connections/implementation/client_proxy_test.cc +++ b/connections/implementation/client_proxy_test.cc @@ -434,10 +434,10 @@ TEST_F(ClientProxyTest, DumpString) { "Nearby Connections State\n" " Client ID: %d\n" " Local Endpoint ID: %s\n" - " High Visibility Mode: 0\n" - " Is Advertising: 0\n" + " High Visibility Mode: false\n" + " Is Advertising: false\n" + " Is Discovering: false\n" " Advertising Service ID: \n" - " Is Discovering: 0\n" " Discovery Service ID: \n" " Connections: \n" " Discovered endpoint IDs: \n",