diff options
author | Patrick Venture <venture@google.com> | 2018-08-31 09:33:09 -0700 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2018-09-04 16:43:17 -0700 |
commit | 3d6d3182ee0b0e88b81fbbbe5c91dea3e99425a9 (patch) | |
tree | e4ce167e617e988157a6ea8bfa9de579ebfcf0b8 /src/test | |
parent | ac8039592ad4b58edbf79900bf41a1faabea3fa2 (diff) | |
download | phosphor-dbus-monitor-3d6d3182ee0b0e88b81fbbbe5c91dea3e99425a9.tar.gz phosphor-dbus-monitor-3d6d3182ee0b0e88b81fbbbe5c91dea3e99425a9.zip |
update .clang-format
Added the header inclusion order to the .clang-format file generated
these changes.
Change-Id: I4f51a20f469de431ee6a5ba78e3f4da39c980fab
Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/callbackgentest.cpp | 4 | ||||
-rw-r--r-- | src/test/callbackgroupgentest.cpp | 4 | ||||
-rw-r--r-- | src/test/callbacktest.cpp | 4 | ||||
-rw-r--r-- | src/test/conditiongentest.cpp | 4 | ||||
-rw-r--r-- | src/test/interfaceaddtest.cpp | 6 | ||||
-rw-r--r-- | src/test/pathgentest.cpp | 4 | ||||
-rw-r--r-- | src/test/propertygentest.cpp | 4 | ||||
-rw-r--r-- | src/test/propertywatchgentest.cpp | 4 | ||||
-rw-r--r-- | src/test/propertywatchtest.cpp | 27 | ||||
-rw-r--r-- | src/test/propertywatchtest.hpp | 39 |
10 files changed, 67 insertions, 33 deletions
diff --git a/src/test/callbackgentest.cpp b/src/test/callbackgentest.cpp index cda665d..87bf160 100644 --- a/src/test/callbackgentest.cpp +++ b/src/test/callbackgentest.cpp @@ -1,7 +1,9 @@ +#include "data_types.hpp" + #include <array> #include <string> + #include <gtest/gtest.h> -#include "data_types.hpp" using namespace phosphor::dbus::monitoring; diff --git a/src/test/callbackgroupgentest.cpp b/src/test/callbackgroupgentest.cpp index fe760ec..64811d7 100644 --- a/src/test/callbackgroupgentest.cpp +++ b/src/test/callbackgroupgentest.cpp @@ -1,7 +1,9 @@ +#include "data_types.hpp" + #include <array> #include <string> + #include <gtest/gtest.h> -#include "data_types.hpp" using namespace phosphor::dbus::monitoring; diff --git a/src/test/callbacktest.cpp b/src/test/callbacktest.cpp index 78736f8..f0c96e0 100644 --- a/src/test/callbacktest.cpp +++ b/src/test/callbacktest.cpp @@ -1,7 +1,7 @@ -#include <gtest/gtest.h> - #include "generated.hpp" +#include <gtest/gtest.h> + using namespace phosphor::dbus::monitoring; TEST(JournalTest, Test) diff --git a/src/test/conditiongentest.cpp b/src/test/conditiongentest.cpp index d0df215..95d9907 100644 --- a/src/test/conditiongentest.cpp +++ b/src/test/conditiongentest.cpp @@ -1,7 +1,9 @@ +#include "data_types.hpp" + #include <array> #include <string> + #include <gtest/gtest.h> -#include "data_types.hpp" using namespace phosphor::dbus::monitoring; diff --git a/src/test/interfaceaddtest.cpp b/src/test/interfaceaddtest.cpp index d80f437..aabacf0 100644 --- a/src/test/interfaceaddtest.cpp +++ b/src/test/interfaceaddtest.cpp @@ -1,8 +1,10 @@ +#include "event.hpp" +#include "pathwatchimpl.hpp" + #include <array> #include <string> + #include <gtest/gtest.h> -#include "pathwatchimpl.hpp" -#include "event.hpp" using namespace std::string_literals; using namespace phosphor::dbus::monitoring; diff --git a/src/test/pathgentest.cpp b/src/test/pathgentest.cpp index 1f75153..9e0e073 100644 --- a/src/test/pathgentest.cpp +++ b/src/test/pathgentest.cpp @@ -1,7 +1,9 @@ +#include "data_types.hpp" + #include <array> #include <string> + #include <gtest/gtest.h> -#include "data_types.hpp" using namespace std::string_literals; using namespace phosphor::dbus::monitoring; diff --git a/src/test/propertygentest.cpp b/src/test/propertygentest.cpp index e9da733..4124246 100644 --- a/src/test/propertygentest.cpp +++ b/src/test/propertygentest.cpp @@ -1,7 +1,9 @@ +#include "data_types.hpp" + #include <array> #include <string> + #include <gtest/gtest.h> -#include "data_types.hpp" using namespace std::string_literals; using namespace phosphor::dbus::monitoring; diff --git a/src/test/propertywatchgentest.cpp b/src/test/propertywatchgentest.cpp index 2e446a4..b1fe6c4 100644 --- a/src/test/propertywatchgentest.cpp +++ b/src/test/propertywatchgentest.cpp @@ -1,7 +1,9 @@ +#include "data_types.hpp" + #include <array> #include <string> + #include <gtest/gtest.h> -#include "data_types.hpp" using namespace std::string_literals; using namespace phosphor::dbus::monitoring; diff --git a/src/test/propertywatchtest.cpp b/src/test/propertywatchtest.cpp index bb021a2..1cf7729 100644 --- a/src/test/propertywatchtest.cpp +++ b/src/test/propertywatchtest.cpp @@ -1,7 +1,9 @@ -#include <array> -#include "propertywatchimpl.hpp" #include "propertywatchtest.hpp" +#include "propertywatchimpl.hpp" + +#include <array> + using namespace std::string_literals; using namespace phosphor::dbus::monitoring; @@ -47,10 +49,12 @@ const PropertyIndex watchIndex = { }, }; -template <typename T> struct ExpectedValues +template <typename T> +struct ExpectedValues { }; -template <> struct ExpectedValues<uint8_t> +template <> +struct ExpectedValues<uint8_t> { static auto& get(size_t i) { @@ -61,7 +65,8 @@ template <> struct ExpectedValues<uint8_t> } }; -template <> struct ExpectedValues<uint16_t> +template <> +struct ExpectedValues<uint16_t> { static auto& get(size_t i) { @@ -72,7 +77,8 @@ template <> struct ExpectedValues<uint16_t> } }; -template <> struct ExpectedValues<uint32_t> +template <> +struct ExpectedValues<uint32_t> { static auto& get(size_t i) { @@ -83,7 +89,8 @@ template <> struct ExpectedValues<uint32_t> } }; -template <> struct ExpectedValues<uint64_t> +template <> +struct ExpectedValues<uint64_t> { static auto& get(size_t i) { @@ -94,7 +101,8 @@ template <> struct ExpectedValues<uint64_t> } }; -template <> struct ExpectedValues<std::string> +template <> +struct ExpectedValues<std::string> { static auto& get(size_t i) { @@ -105,7 +113,8 @@ template <> struct ExpectedValues<std::string> } }; -template <typename T> void testStart() +template <typename T> +void testStart() { using ::testing::_; using ::testing::Return; diff --git a/src/test/propertywatchtest.hpp b/src/test/propertywatchtest.hpp index d226f93..e27ba18 100644 --- a/src/test/propertywatchtest.hpp +++ b/src/test/propertywatchtest.hpp @@ -1,11 +1,12 @@ #pragma once -#include <gmock/gmock.h> -#include <gtest/gtest.h> -#include <string> - #include "data_types.hpp" #include "sdbusplus/bus/match.hpp" +#include <string> + +#include <gmock/gmock.h> +#include <gtest/gtest.h> + namespace phosphor { namespace dbus @@ -292,11 +293,13 @@ struct MockDBusInterface /** @class Expect * @brief Enable use of EXPECT_CALL from a C++ template. */ -template <typename T> struct Expect +template <typename T> +struct Expect { }; -template <> struct Expect<uint64_t> +template <> +struct Expect<uint64_t> { template <typename MockObjType> static auto& getProperties(MockObjType&& mockObj, const std::string& path, @@ -309,7 +312,8 @@ template <> struct Expect<uint64_t> } }; -template <> struct Expect<uint32_t> +template <> +struct Expect<uint32_t> { template <typename MockObjType> static auto& getProperties(MockObjType&& mockObj, const std::string& path, @@ -322,7 +326,8 @@ template <> struct Expect<uint32_t> } }; -template <> struct Expect<uint16_t> +template <> +struct Expect<uint16_t> { template <typename MockObjType> static auto& getProperties(MockObjType&& mockObj, const std::string& path, @@ -335,7 +340,8 @@ template <> struct Expect<uint16_t> } }; -template <> struct Expect<uint8_t> +template <> +struct Expect<uint8_t> { template <typename MockObjType> static auto& getProperties(MockObjType&& mockObj, const std::string& path, @@ -348,7 +354,8 @@ template <> struct Expect<uint8_t> } }; -template <> struct Expect<int64_t> +template <> +struct Expect<int64_t> { template <typename MockObjType> static auto& getProperties(MockObjType&& mockObj, const std::string& path, @@ -361,7 +368,8 @@ template <> struct Expect<int64_t> } }; -template <> struct Expect<int32_t> +template <> +struct Expect<int32_t> { template <typename MockObjType> static auto& getProperties(MockObjType&& mockObj, const std::string& path, @@ -374,7 +382,8 @@ template <> struct Expect<int32_t> } }; -template <> struct Expect<int16_t> +template <> +struct Expect<int16_t> { template <typename MockObjType> static auto& getProperties(MockObjType&& mockObj, const std::string& path, @@ -387,7 +396,8 @@ template <> struct Expect<int16_t> } }; -template <> struct Expect<int8_t> +template <> +struct Expect<int8_t> { template <typename MockObjType> static auto& getProperties(MockObjType&& mockObj, const std::string& path, @@ -400,7 +410,8 @@ template <> struct Expect<int8_t> } }; -template <> struct Expect<std::string> +template <> +struct Expect<std::string> { template <typename MockObjType> static auto& getProperties(MockObjType&& mockObj, const std::string& path, |