Skip to content

Commit

Permalink
pw_{hdlc,hex_dump,i2c}: Use unit test framework
Browse files Browse the repository at this point in the history
Include pw_unit_test/framework.h instead of gtest/gtest.h as the facade
for unit tests.

Change-Id: I75352178a900c9359b718ea81c710ad7dc19d7e7
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/183302
Commit-Queue: Carlos Chinchilla <cachinchilla@google.com>
Reviewed-by: Taylor Cramer <cramertj@google.com>
Pigweed-Auto-Submit: Carlos Chinchilla <cachinchilla@google.com>
  • Loading branch information
ChinchillaWithGoggles authored and CQ Bot Account committed Dec 7, 2023
1 parent c51a9bc commit 9586deb
Showing 16 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion pw_hdlc/decoder_test.cc
Original file line number Diff line number Diff line change
@@ -17,10 +17,10 @@
#include <array>
#include <cstddef>

#include "gtest/gtest.h"
#include "pw_bytes/array.h"
#include "pw_fuzzer/fuzztest.h"
#include "pw_hdlc/internal/protocol.h"
#include "pw_unit_test/framework.h"

namespace pw::hdlc {
namespace {
2 changes: 1 addition & 1 deletion pw_hdlc/encoded_size_test.cc
Original file line number Diff line number Diff line change
@@ -18,13 +18,13 @@
#include <cstddef>
#include <cstdint>

#include "gtest/gtest.h"
#include "pw_bytes/array.h"
#include "pw_hdlc/decoder.h"
#include "pw_hdlc/encoder.h"
#include "pw_hdlc/internal/encoder.h"
#include "pw_result/result.h"
#include "pw_stream/memory_stream.h"
#include "pw_unit_test/framework.h"
#include "pw_varint/varint.h"

namespace pw::hdlc {
2 changes: 1 addition & 1 deletion pw_hdlc/encoder_test.cc
Original file line number Diff line number Diff line change
@@ -19,12 +19,12 @@
#include <cstddef>
#include <cstring>

#include "gtest/gtest.h"
#include "pw_bytes/array.h"
#include "pw_hdlc/encoded_size.h"
#include "pw_hdlc/internal/encoder.h"
#include "pw_hdlc/internal/protocol.h"
#include "pw_stream/memory_stream.h"
#include "pw_unit_test/framework.h"

using std::byte;

2 changes: 1 addition & 1 deletion pw_hdlc/py/decode_test.py
Original file line number Diff line number Diff line change
@@ -364,7 +364,7 @@ def _expected(frames: List[Frame]) -> Iterator[str]:
#include <cstddef>
#include <variant>
#include "gtest/gtest.h"
#include "pw_unit_test/framework.h"
#include "pw_bytes/array.h"
namespace pw::hdlc {
2 changes: 1 addition & 1 deletion pw_hdlc/rpc_channel_test.cc
Original file line number Diff line number Diff line change
@@ -32,10 +32,10 @@
#include <array>
#include <cstddef>

#include "gtest/gtest.h"
#include "pw_bytes/array.h"
#include "pw_hdlc/encoded_size.h"
#include "pw_stream/memory_stream.h"
#include "pw_unit_test/framework.h"

using std::byte;

2 changes: 1 addition & 1 deletion pw_hdlc/wire_packet_parser_test.cc
Original file line number Diff line number Diff line change
@@ -14,9 +14,9 @@

#include "pw_hdlc/wire_packet_parser.h"

#include "gtest/gtest.h"
#include "pw_bytes/array.h"
#include "pw_hdlc/internal/protocol.h"
#include "pw_unit_test/framework.h"

namespace pw::hdlc {
namespace {
2 changes: 1 addition & 1 deletion pw_hex_dump/hex_dump_test.cc
Original file line number Diff line number Diff line change
@@ -20,9 +20,9 @@
#include <cstring>
#include <string_view>

#include "gtest/gtest.h"
#include "pw_log/log.h"
#include "pw_span/span.h"
#include "pw_unit_test/framework.h"

namespace pw::dump {
namespace {
2 changes: 1 addition & 1 deletion pw_i2c/address_test.cc
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@

#include "pw_i2c/address.h"

#include "gtest/gtest.h"
#include "pw_unit_test/framework.h"

namespace pw::i2c {

2 changes: 1 addition & 1 deletion pw_i2c/device_test.cc
Original file line number Diff line number Diff line change
@@ -16,10 +16,10 @@

#include <chrono>

#include "gtest/gtest.h"
#include "pw_bytes/byte_builder.h"
#include "pw_containers/algorithm.h"
#include "pw_i2c/initiator_mock.h"
#include "pw_unit_test/framework.h"

using namespace std::literals::chrono_literals;

2 changes: 1 addition & 1 deletion pw_i2c/i2c_service_test.cc
Original file line number Diff line number Diff line change
@@ -16,12 +16,12 @@
#include <algorithm>
#include <chrono>

#include "gtest/gtest.h"
#include "pw_i2c/address.h"
#include "pw_i2c/initiator.h"
#include "pw_i2c/initiator_mock.h"
#include "pw_rpc/pwpb/test_method_context.h"
#include "pw_status/status.h"
#include "pw_unit_test/framework.h"

namespace pw::i2c {
namespace {
2 changes: 1 addition & 1 deletion pw_i2c/initiator_mock.cc
Original file line number Diff line number Diff line change
@@ -13,9 +13,9 @@
// the License.
#include "pw_i2c/initiator_mock.h"

#include "gtest/gtest.h"
#include "pw_assert/check.h"
#include "pw_containers/algorithm.h"
#include "pw_unit_test/framework.h"

namespace pw::i2c {

2 changes: 1 addition & 1 deletion pw_i2c/initiator_mock_test.cc
Original file line number Diff line number Diff line change
@@ -17,12 +17,12 @@
#include <array>
#include <chrono>

#include "gtest/gtest.h"
#include "pw_bytes/array.h"
#include "pw_bytes/span.h"
#include "pw_containers/algorithm.h"
#include "pw_i2c/address.h"
#include "pw_span/span.h"
#include "pw_unit_test/framework.h"

using namespace std::literals::chrono_literals;

2 changes: 1 addition & 1 deletion pw_i2c/register_device_test.cc
Original file line number Diff line number Diff line change
@@ -13,9 +13,9 @@
// the License.
#include "pw_i2c/register_device.h"

#include "gtest/gtest.h"
#include "pw_assert/check.h"
#include "pw_bytes/byte_builder.h"
#include "pw_unit_test/framework.h"

namespace pw {
namespace i2c {
2 changes: 1 addition & 1 deletion pw_i2c_linux/initiator_test.cc
Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@

#include <type_traits>

#include "gtest/gtest.h"
#include "pw_i2c/initiator.h"
#include "pw_unit_test/framework.h"

namespace pw::i2c {
namespace {
2 changes: 1 addition & 1 deletion pw_intrusive_ptr/intrusive_ptr_test.cc
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@

#include <utility>

#include "gtest/gtest.h"
#include "pw_unit_test/framework.h"

namespace pw {
namespace {
2 changes: 1 addition & 1 deletion pw_intrusive_ptr/recyclable_test.cc
Original file line number Diff line number Diff line change
@@ -18,8 +18,8 @@

#include <utility>

#include "gtest/gtest.h"
#include "pw_intrusive_ptr/intrusive_ptr.h"
#include "pw_unit_test/framework.h"

namespace pw {
namespace {

0 comments on commit 9586deb

Please sign in to comment.