Move over to upstream c++ style
This patchset moves bmcweb over to the upstream style naming
conventions for variables, classes, and functions, as well as imposes
the latest clang-format file.
This changeset was mostly built automatically by the included
.clang-tidy file, which has the ability to autoformat and auto rename
variables. At some point in the future I would like to see this in
greater use, but for now, we will impose it on bmcweb, and see how it
goes.
Tested: Code still compiles, and appears to run, although other issues
are possible and likely.
Change-Id: If422a2e36df924e897736b3feffa89f411d9dac1
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
diff --git a/src/kvm_websocket_test.cpp b/src/kvm_websocket_test.cpp
index 94a9ffc..b5e1bdc 100644
--- a/src/kvm_websocket_test.cpp
+++ b/src/kvm_websocket_test.cpp
@@ -15,11 +15,11 @@
return; // TODO(ed) Make hte code below work again
SimpleApp app;
- crow::kvm::request_routes(app);
+ crow::kvm::requestRoutes(app);
app.bindaddr("127.0.0.1").port(45451);
- CROW_ROUTE(app, "/")([]() { return boost::beast::http::status::ok; });
+ BMCWEB_ROUTE(app, "/")([]() { return boost::beast::http::status::ok; });
auto _ = async(std::launch::async, [&] { app.run(); });
- auto routes = app.get_routes();
+ auto routes = app.getRoutes();
asio::io_service is;
{
@@ -56,23 +56,23 @@
asio::ip::address::from_string("127.0.0.1"), 45451));
socket.send(asio::buffer(sendmsg));
- // Read the response status line. The response streambuf will automatically
+ // Read the Response status line. The Response streambuf will automatically
// grow to accommodate the entire line. The growth may be limited by passing
// a maximum size to the streambuf constructor.
boost::asio::streambuf response;
boost::asio::read_until(socket, response, "\r\n");
- // Check that response is OK.
+ // Check that Response is OK.
std::istream response_stream(&response);
std::string http_response;
std::getline(response_stream, http_response);
EXPECT_EQ(http_response, "HTTP/1.1 101 Switching Protocols\r");
- // Read the response headers, which are terminated by a blank line.
+ // Read the Response headers, which are terminated by a blank line.
boost::asio::read_until(socket, response, "\r\n\r\n");
- // Process the response headers.
+ // Process the Response headers.
std::string header;
std::vector<std::string> headers;
while (std::getline(response_stream, header) && header != "\r") {