mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 14:46:12 -04:00
Internal change.
PiperOrigin-RevId: 423369197
This commit is contained in:
@@ -27,7 +27,7 @@ git submodule update --init --recursive
|
||||
|
||||
# Building Nearby, Unit Testing and Sample Apps
|
||||
We support multiple platforms including Linux, iOS & Windows. The ultimate goal
|
||||
is to build from source. The offical build system we support is
|
||||
is to build from source (coming soon!). The offical build system we support is
|
||||
[bazel] (https://bazel.build). Before that is accomplished, we provide
|
||||
precompiled libraries as stop-gap solutions. See the following pages for
|
||||
platform specific instructions.
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "third_party/nearby/cpp/cal/api/ble.h"
|
||||
#include "third_party/nearby/cpp/cal/base/ble_types.h"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "core/core.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/time/clock.h"
|
||||
#include "core/internal/mock_service_controller_router.h"
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "securegcm/d2d_connection_context_v1.h"
|
||||
#include "securegcm/ukey2_handshake.h"
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/synchronization/mutex.h"
|
||||
#include "absl/time/time.h"
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/time/time.h"
|
||||
#include "connections/implementation/proto/offline_wire_formats.pb.h"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/time/time.h"
|
||||
#include "core/internal/client_proxy.h"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/container/flat_hash_set.h"
|
||||
#include "absl/time/clock.h"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "core/internal/encryption_runner.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/time/clock.h"
|
||||
#include "core/internal/client_proxy.h"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "core/internal/endpoint_channel_manager.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
namespace location {
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/synchronization/mutex.h"
|
||||
#include "absl/time/clock.h"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "connections/implementation/proto/offline_wire_formats.pb.h"
|
||||
#include "core/internal/offline_frames.h"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "core/internal/mediums/bluetooth_radio.h"
|
||||
#include "platform/base/medium_environment.h"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/time/time.h"
|
||||
#include "core/internal/mediums/bluetooth_radio.h"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "core/internal/mediums/bluetooth_radio.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
namespace location {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "core/internal/mediums/uuid.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "platform/public/crypto.h"
|
||||
#include "platform/public/logging.h"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/time/time.h"
|
||||
#include "core/internal/mediums/webrtc/session_description_wrapper.h"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "google/protobuf/text_format.h"
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "core/internal/mediums/webrtc_peer_id.h"
|
||||
|
||||
@@ -86,7 +87,7 @@ TEST(SignalingFramesTest, SignalingPoke) {
|
||||
location::nearby::mediums::WebRtcSignalingFrame frame;
|
||||
frame.ParseFromString(std::string(encoded_poke.data(), encoded_poke.size()));
|
||||
|
||||
EXPECT_THAT(frame, testing::EqualsProto(R"pb(
|
||||
EXPECT_THAT(frame, protobuf_matchers::EqualsProto(R"pb(
|
||||
sender_id { id: "abc" }
|
||||
type: READY_FOR_SIGNALING_POKE_TYPE
|
||||
ready_for_signaling_poke {}
|
||||
@@ -103,7 +104,7 @@ TEST(SignalingFramesTest, EncodeValidOffer) {
|
||||
frame.ParseFromString(
|
||||
std::string(encoded_offer.data(), encoded_offer.size()));
|
||||
|
||||
EXPECT_THAT(frame, testing::EqualsProto(kOfferProto));
|
||||
EXPECT_THAT(frame, protobuf_matchers::EqualsProto(kOfferProto));
|
||||
}
|
||||
|
||||
TEST(SignaingFramesTest, DecodeValidOffer) {
|
||||
@@ -128,7 +129,7 @@ TEST(SignalingFramesTest, EncodeValidAnswer) {
|
||||
frame.ParseFromString(
|
||||
std::string(encoded_answer.data(), encoded_answer.size()));
|
||||
|
||||
EXPECT_THAT(frame, testing::EqualsProto(kAnswerProto));
|
||||
EXPECT_THAT(frame, protobuf_matchers::EqualsProto(kAnswerProto));
|
||||
}
|
||||
|
||||
TEST(SignalingFramesTest, DecodeValidAnswer) {
|
||||
@@ -163,7 +164,7 @@ TEST(SignalingFramesTest, EncodeValidIceCandidates) {
|
||||
frame.ParseFromString(
|
||||
std::string(encoded_candidates.data(), encoded_candidates.size()));
|
||||
|
||||
EXPECT_THAT(frame, testing::EqualsProto(kIceCandidatesProto));
|
||||
EXPECT_THAT(frame, protobuf_matchers::EqualsProto(kIceCandidatesProto));
|
||||
}
|
||||
|
||||
TEST(SignalingFramesTest, DecodeValidIceCandidates) {
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "platform/base/byte_array.h"
|
||||
#include "webrtc/api/data_channel_interface.h"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "platform/base/byte_array.h"
|
||||
#include "platform/public/crypto.h"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "core/internal/mediums/webrtc.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "core/internal/mediums/webrtc_socket.h"
|
||||
#include "platform/base/listeners.h"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "platform/base/medium_environment.h"
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#define CORE_INTERNAL_MOCK_SERVICE_CONTROLLER_H_
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "core/internal/service_controller.h"
|
||||
|
||||
namespace location {
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#define CORE_INTERNAL_MOCK_SERVICE_CONTROLLER_ROUTER_H_
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "core/internal/service_controller_router.h"
|
||||
|
||||
namespace location {
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "connections/implementation/proto/offline_wire_formats.pb.h"
|
||||
@@ -32,7 +33,7 @@ namespace parser {
|
||||
namespace {
|
||||
|
||||
using Medium = proto::connections::Medium;
|
||||
using ::testing::EqualsProto;
|
||||
using ::protobuf_matchers::EqualsProto;
|
||||
|
||||
constexpr absl::string_view kEndpointId{"ABC"};
|
||||
constexpr absl::string_view kEndpointName{"XYZ"};
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "connections/implementation/proto/offline_wire_formats.pb.h"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <array>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "core/internal/offline_simulation_user.h"
|
||||
#include "platform/base/medium_environment.h"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/time/time.h"
|
||||
#include "core/internal/bwu_manager.h"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "core/internal/payload_manager.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "core/internal/simulation_user.h"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/time/time.h"
|
||||
#include "core/internal/endpoint_channel_manager.h"
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/container/flat_hash_set.h"
|
||||
#include "absl/time/clock.h"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
namespace location {
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <type_traits>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "platform/base/byte_array.h"
|
||||
#include "platform/base/input_stream.h"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "core/status.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
namespace location {
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "platform/base/cancellation_flag_listener.h"
|
||||
#include "platform/base/feature_flags.h"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "platform/base/error_code_recorder.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
namespace location {
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "platform/base/exception_test.nc.h"
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "platform/base/byte_array.h"
|
||||
#include "openssl/digest.h"
|
||||
#include "src/include/openssl/digest.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
|
||||
@@ -34,7 +34,7 @@ class LogMessage : public api::LogMessage {
|
||||
std::ostream& Stream() override;
|
||||
|
||||
private:
|
||||
absl::LogStreamer log_streamer_;
|
||||
google::LogMessage log_streamer_;
|
||||
};
|
||||
|
||||
} // namespace g3
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "absl/time/clock.h"
|
||||
#include "platform/api/submittable_executor.h"
|
||||
#include "platform/impl/shared/count_down_latch.h"
|
||||
#include "thread/threadpool.h"
|
||||
#include "nisaba/port/thread_pool.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "platform/api/scheduled_executor.h"
|
||||
#include "platform/base/runnable.h"
|
||||
#include "platform/impl/g3/single_thread_executor.h"
|
||||
#include "thread/threadpool.h"
|
||||
#include "nisaba/port/thread_pool.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
|
||||
@@ -36,7 +36,7 @@ class LogMessage : public api::LogMessage {
|
||||
std::ostream& Stream() override;
|
||||
|
||||
private:
|
||||
absl::LogStreamer log_streamer_;
|
||||
google::LogMessage log_streamer_;
|
||||
api::LogMessage::Severity severity_;
|
||||
};
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#if defined NEARBY_WINDOWS_DLL
|
||||
#include "openssl/boringssl/src/include/openssl/digest.h"
|
||||
#else
|
||||
#include "openssl/digest.h"
|
||||
#include "src/include/openssl/digest.h"
|
||||
#endif
|
||||
|
||||
// Function implementations for platform/api/crypto.h.
|
||||
|
||||
@@ -34,7 +34,7 @@ class LogMessage : public api::LogMessage {
|
||||
std::ostream& Stream() override;
|
||||
|
||||
private:
|
||||
absl::LogStreamer log_streamer_;
|
||||
google::LogMessage log_streamer_;
|
||||
static api::LogMessage::Severity min_log_severity_;
|
||||
};
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "platform/public/atomic_boolean.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
namespace location {
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "platform/base/medium_environment.h"
|
||||
#include "platform/public/count_down_latch.h"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "platform/public/bluetooth_adapter.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "platform/base/bluetooth_utils.h"
|
||||
#include "platform/public/logging.h"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/time/time.h"
|
||||
#include "platform/base/medium_environment.h"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "platform/public/cancelable_alarm.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/time/time.h"
|
||||
#include "platform/public/atomic_boolean.h"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "platform/public/condition_variable.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/time/time.h"
|
||||
#include "platform/public/logging.h"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "platform/public/crypto.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "platform/base/byte_array.h"
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "platform/public/logging.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "platform/base/medium_environment.h"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/time/time.h"
|
||||
#include "platform/base/error_code_params.h"
|
||||
@@ -64,7 +65,7 @@ using ::location::nearby::proto::connections::WIFI_LAN_MEDIUM_ERROR;
|
||||
using ::location::nearby::proto::connections::WIFI_LAN_SOCKET_CREATION;
|
||||
|
||||
using ::testing::Contains;
|
||||
using ::testing::EqualsProto;
|
||||
using ::protobuf_matchers::EqualsProto;
|
||||
using ::testing::proto::Partially;
|
||||
|
||||
constexpr absl::Duration kDefaultTimeout = absl::Milliseconds(1000);
|
||||
|
||||
Reference in New Issue
Block a user