Skip to content

Commit

Permalink
Change dependency includes
Browse files Browse the repository at this point in the history
Include headers by "" instead of <> so the local headers are prefered
over the headers installed in system directories.
  • Loading branch information
Danielius1922 committed Aug 7, 2024
1 parent c4588fb commit b7270a2
Show file tree
Hide file tree
Showing 151 changed files with 376 additions and 258 deletions.
3 changes: 2 additions & 1 deletion api/client/unittest/clientcbtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
#include "tests/gtest/Device.h"
#include "tests/gtest/Endpoint.h"

#include "gtest/gtest.h"

#include <array>
#include <gtest/gtest.h>
#include <cstdint>
#include <limits>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion api/cloud/unittest/cloud_access_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "tests/gtest/Device.h"
#include "tests/gtest/Endpoint.h"

#include <gtest/gtest.h>
#include "gtest/gtest.h"

class TestCloudAccess : public testing::Test {
public:
Expand Down
2 changes: 1 addition & 1 deletion api/cloud/unittest/cloud_context_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "oc_uuid.h"
#include "util/oc_features.h"

#include <gtest/gtest.h>
#include "gtest/gtest.h"
#include <vector>

class TestCloudContext : public testing::Test {
Expand Down
3 changes: 2 additions & 1 deletion api/cloud/unittest/cloud_manager_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@
#include "tests/gtest/Device.h"
#include "tests/gtest/RepPool.h"

#include "gtest/gtest.h"

#include <array>
#include <gtest/gtest.h>
#include <optional>
#include <string>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion api/cloud/unittest/cloud_rd_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "oc_ri.h"
#include "tests/gtest/Device.h"

#include <gtest/gtest.h>
#include "gtest/gtest.h"

static constexpr size_t kDeviceID{ 0 };

Expand Down
3 changes: 2 additions & 1 deletion api/cloud/unittest/cloud_resource_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
#include "tests/gtest/Resource.h"
#include "util/oc_macros_internal.h"

#include "gtest/gtest.h"

#include <cstddef>
#include <gtest/gtest.h>
#include <string>

using namespace std::chrono_literals;
Expand Down
5 changes: 3 additions & 2 deletions api/cloud/unittest/cloud_store_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@
#include "tests/gtest/RepPool.h"
#include "util/oc_endpoint_address.h"

#include "gtest/gtest.h"

#include <array>
#include <filesystem>
#include <fstream>
#include <functional>
#include <gtest/gtest.h>
#include <map>
#include <string>
#include <string_view>
#include <map>

using namespace std::chrono_literals;

Expand Down
13 changes: 7 additions & 6 deletions api/cloud/unittest/cloud_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@
#include "util/oc_secure_string_internal.h"
#include "util/oc_features.h"

#include <array>
#include <gtest/gtest.h>
#include <set>
#include <string>
#include <vector>

#ifdef OC_SECURITY
#include "security/oc_pstat_internal.h"
#include "security/oc_svr_internal.h"
Expand All @@ -51,6 +45,13 @@
#include "api/oc_push_internal.h"
#endif /* OC_HAS_FEATURE_PUSH */

#include "gtest/gtest.h"

#include <array>
#include <set>
#include <string>
#include <vector>

using namespace std::chrono_literals;

static constexpr size_t kDeviceID{ 0 };
Expand Down
3 changes: 2 additions & 1 deletion api/cloud/unittest/rd_client_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@
#include "tests/gtest/Endpoint.h"
#include "tests/gtest/RepPool.h"

#include "gtest/gtest.h"

#include <array>
#include <gtest/gtest.h>
#include <optional>
#include <string>
#include <vector>
Expand Down
3 changes: 2 additions & 1 deletion api/oc_core_res_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
#include "port/oc_connectivity_internal.h"
#include "util/oc_compiler.h"

#include <cbor.h>
#include "cbor.h"

#include <stdbool.h>
#include <stddef.h>

Expand Down
2 changes: 0 additions & 2 deletions api/oc_rep_encode_cbor.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

#include "api/oc_rep_encode_cbor_internal.h"

#include <cbor.h>

oc_rep_encoder_implementation_t
oc_rep_cbor_encoder(void)
{
Expand Down
3 changes: 2 additions & 1 deletion api/oc_rep_encode_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
#include "oc_ri.h"
#include "util/oc_compiler.h"

#include <cbor.h>
#include "cbor.h"

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
Expand Down
2 changes: 1 addition & 1 deletion api/oc_server_api_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "util/oc_compiler.h"

#ifdef OC_RES_BATCH_SUPPORT
#include <cbor.h>
#include "cbor.h"
#endif /* OC_RES_BATCH_SUPPORT */

#include <stdbool.h>
Expand Down
2 changes: 1 addition & 1 deletion api/oc_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "oc_tcp_internal.h"
#include "util/oc_atomic.h"
#ifdef OC_SECURITY
#include <mbedtls/ssl.h>
#include "mbedtls/ssl.h"
#ifdef OC_OSCORE
#include "messaging/coap/oscore_internal.h"
#endif /* OC_OSCORE */
Expand Down
2 changes: 1 addition & 1 deletion api/oc_udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "messaging/coap/coap_internal.h"
#include "port/oc_connectivity.h"
#ifdef OC_SECURITY
#include <mbedtls/ssl.h>
#include "mbedtls/ssl.h"
#ifdef OC_OSCORE
#include "messaging/coap/oscore_internal.h"
#endif /* OC_OSCORE */
Expand Down
2 changes: 1 addition & 1 deletion api/plgd/plgd_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#include <time.h>

#ifdef OC_SECURITY
#include <mbedtls/x509.h>
#include "mbedtls/x509.h"
#endif /* OC_SECURITY */

#ifdef OC_CLIENT
Expand Down
2 changes: 1 addition & 1 deletion api/plgd/plgd_time_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "port/oc_clock.h"

#ifdef OC_SECURITY
#include <mbedtls/platform_time.h>
#include "mbedtls/platform_time.h"
#endif /* OC_SECURITY */

#include <stdbool.h>
Expand Down
3 changes: 2 additions & 1 deletion api/unittest/RIServerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@
#include "tests/gtest/Device.h"
#include "util/oc_process_internal.h"

#include "gtest/gtest.h"

#include <array>
#include <cstdint>
#include <gtest/gtest.h>
#include <unordered_map>

static const std::string kResourceURI = "/LightResourceURI";
Expand Down
3 changes: 2 additions & 1 deletion api/unittest/RITest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
#include "messaging/coap/signal_internal.h"
#endif /* OC_TCP */

#include <gtest/gtest.h>
#include "gtest/gtest.h"

#include <limits>
#include <set>
#include <string>
Expand Down
3 changes: 2 additions & 1 deletion api/unittest/base64test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
#include "oc_base64.h"
#include "oc_helpers.h"

#include "gtest/gtest.h"

#include <algorithm>
#include <array>
#include <gtest/gtest.h>
#include <stddef.h>
#include <string>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion api/unittest/buffertest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "util/oc_memb.h"
#include "util/oc_process_internal.h"

#include <gtest/gtest.h>
#include "gtest/gtest.h"
#include <memory>

constexpr size_t kTestMessagesPoolSize = 1;
Expand Down
3 changes: 2 additions & 1 deletion api/unittest/collectiontest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@
#include "oc_etag.h"
#endif /* OC_HAS_FEATURE_ETAG */

#include "gtest/gtest.h"

#include <algorithm>
#include <array>
#include <chrono>
#include <gtest/gtest.h>
#include <memory>
#include <string>
#include <vector>
Expand Down
3 changes: 2 additions & 1 deletion api/unittest/conresourcetest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
#include "tests/gtest/Resource.h"
#include "util/oc_macros_internal.h"

#include "gtest/gtest.h"

#include <functional>
#include <gtest/gtest.h>
#include <optional>
#include <string>

Expand Down
5 changes: 3 additions & 2 deletions api/unittest/coreresourcetest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@
#include "api/oc_push_internal.h"
#endif /* OC_HAS_FEATURE_PUSH */

#include "gtest/gtest.h"

#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <gtest/gtest.h>
#include <stdio.h>
#include <string>

using namespace std::chrono_literals;
Expand Down
2 changes: 1 addition & 1 deletion api/unittest/discovery/discovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "tests/gtest/Collection.h"
#endif /* OC_COLLECTIONS */

#include <gtest/gtest.h>
#include "gtest/gtest.h"

namespace oc::discovery {

Expand Down
3 changes: 2 additions & 1 deletion api/unittest/discovery/discovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@
#include "messaging/coap/oc_coap.h"
#endif /* OC_HAS_FEATURE_ETAG */

#include "gtest/gtest.h"

#include <cstdint>
#include <string>
#include <gtest/gtest.h>
#include <vector>
#include <unordered_map>

Expand Down
3 changes: 2 additions & 1 deletion api/unittest/discovery/discoverytest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@
#include "security/oc_sdi_internal.h"
#endif /* OC_SECURITY */

#include "gtest/gtest.h"

#include <algorithm>
#include <array>
#include <chrono>
#include <cinttypes>
#include <cstring>
#include <gtest/gtest.h>
#include <map>
#include <string>
#include <vector>
Expand Down
3 changes: 2 additions & 1 deletion api/unittest/encoder/TestEncoderBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
#include "oc_rep.h"
#include "tests/gtest/RepPool.h"

#include "gtest/gtest.h"

#include <array>
#include <gtest/gtest.h>
#include <optional>
#include <vector>

Expand Down
2 changes: 1 addition & 1 deletion api/unittest/enumstest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include "api/oc_enums_internal.h"

#include <gtest/gtest.h>
#include "gtest/gtest.h"
#include <limits>
#include <string>

Expand Down
3 changes: 2 additions & 1 deletion api/unittest/eptest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@
#include "tests/gtest/Device.h"
#include "tests/gtest/Endpoint.h"

#include "gtest/gtest.h"

#include <array>
#include <cstdlib>
#include <gtest/gtest.h>
#include <string>
#include <string_view>
#include <vector>
Expand Down
3 changes: 2 additions & 1 deletion api/unittest/etagtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,14 @@
#include "api/plgd/plgd_time_internal.h"
#endif /* OC_HAS_FEATURE_PLGD_TIME */

#include "gtest/gtest.h"

#include <algorithm>
#include <array>
#include <chrono>
#include <filesystem>
#include <fstream>
#include <functional>
#include <gtest/gtest.h>
#include <map>
#include <string>
#include <vector>
Expand Down
3 changes: 2 additions & 1 deletion api/unittest/eventcallbacktest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@
#include "security/oc_security_internal.h"
#endif /* OC_SECURITY */

#include "gtest/gtest.h"

#include <chrono>
#include <gtest/gtest.h>
#include <string>
#include <vector>

Expand Down
2 changes: 1 addition & 1 deletion api/unittest/eventstest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "api/oc_events_internal.h"
#include "port/oc_log_internal.h"

#include <gtest/gtest.h>
#include "gtest/gtest.h"

class TestEvents : public testing::Test {
public:
Expand Down
3 changes: 2 additions & 1 deletion api/unittest/helperstest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
#include "oc_helpers.h"
#include "port/oc_random.h"

#include "gtest/gtest.h"

#include <array>
#include <cstdint>
#include <cstdlib>
#include <gtest/gtest.h>
#include <numeric>
#include <vector>

Expand Down
3 changes: 2 additions & 1 deletion api/unittest/introspectiontest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@
#include "tests/gtest/Resource.h"
#include "tests/gtest/Storage.h"

#include "gtest/gtest.h"

#include <algorithm>
#include <fstream>
#include <gtest/gtest.h>
#include <iterator>
#include <vector>

Expand Down
Loading

0 comments on commit b7270a2

Please sign in to comment.