clang-format: Update to match docs repo
Update the .clang-format file and run clang-format-6.0.
This .clang-format matches the example one in
https://github.com/openbmc/docs/blob/master/cpp-style-and-conventions.md#clang-formatting
Change-Id: Ia331c9a5b040e1a3c45a0ebf1b8d776d93b05ae5
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/test/test_config_parser.cpp b/test/test_config_parser.cpp
index 1c902d2..99effad 100644
--- a/test/test_config_parser.cpp
+++ b/test/test_config_parser.cpp
@@ -1,14 +1,14 @@
-#include <gtest/gtest.h>
+#include "config.h"
#include "config_parser.hpp"
-
#include "xyz/openbmc_project/Common/error.hpp"
-#include <phosphor-logging/elog-errors.hpp>
-#include "config.h"
#include <exception>
-#include <stdexcept>
#include <fstream>
+#include <phosphor-logging/elog-errors.hpp>
+#include <stdexcept>
+
+#include <gtest/gtest.h>
namespace phosphor
{
@@ -17,31 +17,31 @@
class TestConfigParser : public testing::Test
{
- public:
- config::Parser parser;
- TestConfigParser()
- {
- remove("/tmp/eth0.network");
- std::ofstream filestream("/tmp/eth0.network");
+ public:
+ config::Parser parser;
+ TestConfigParser()
+ {
+ remove("/tmp/eth0.network");
+ std::ofstream filestream("/tmp/eth0.network");
- filestream << "[Match]\nName=eth0\n" <<
- "[Network]\nDHCP=true\n[DHCP]\nClientIdentifier= mac\n";
- filestream.close();
- parser.setFile("/tmp/eth0.network");
- }
+ filestream << "[Match]\nName=eth0\n"
+ << "[Network]\nDHCP=true\n[DHCP]\nClientIdentifier= mac\n";
+ filestream.close();
+ parser.setFile("/tmp/eth0.network");
+ }
- bool isValueFound(const std::vector<std::string>& values,
- const std::string& expectedValue)
+ bool isValueFound(const std::vector<std::string>& values,
+ const std::string& expectedValue)
+ {
+ for (const auto& value : values)
{
- for (const auto& value : values)
+ if (expectedValue == value)
{
- if (expectedValue == value)
- {
- return true;
- }
+ return true;
}
- return false;
}
+ return false;
+ }
};
TEST_F(TestConfigParser, ReadConfigDataFromFile)
@@ -82,5 +82,5 @@
remove("/tmp/eth0.network");
}
-}//namespace network
-}//namespace phosphor
+} // namespace network
+} // namespace phosphor