summaryrefslogtreecommitdiff
path: root/src/components/utils
diff options
context:
space:
mode:
authorjacobkeeler <jacob.keeler@livioradio.com>2019-04-29 17:24:27 -0400
committerjacobkeeler <jacob.keeler@livioradio.com>2019-04-29 17:24:27 -0400
commit09a161ba3e35c10b3f1b5d6c8a2d17943dbf516a (patch)
tree31d2069a22c9bd5d493498341f958d8d62228823 /src/components/utils
parentdc906fbd1b3609c049d96d82f443fb678dd84d6f (diff)
downloadsdl_core-09a161ba3e35c10b3f1b5d6c8a2d17943dbf516a.tar.gz
Run updated style script
Diffstat (limited to 'src/components/utils')
-rw-r--r--src/components/utils/include/utils/back_trace.h2
-rw-r--r--src/components/utils/include/utils/file_system.h2
-rw-r--r--src/components/utils/include/utils/helpers.h2
-rw-r--r--src/components/utils/include/utils/log_message_loop_thread.h4
-rw-r--r--src/components/utils/include/utils/optional.h2
-rw-r--r--src/components/utils/include/utils/qdb_wrapper/sql_query.h4
-rw-r--r--src/components/utils/include/utils/resource_usage.h6
-rw-r--r--src/components/utils/include/utils/singleton.h2
-rw-r--r--src/components/utils/include/utils/sqlite_wrapper/sql_database.h2
-rw-r--r--src/components/utils/include/utils/sqlite_wrapper/sql_query.h2
-rw-r--r--src/components/utils/include/utils/system.h2
-rw-r--r--src/components/utils/include/utils/threads/pulse_thread_delegate.h22
-rw-r--r--src/components/utils/include/utils/threads/thread_manager.h10
-rw-r--r--src/components/utils/include/utils/timer.h6
-rw-r--r--src/components/utils/include/utils/timer_task_impl.h2
-rw-r--r--src/components/utils/src/back_trace.cc4
-rw-r--r--src/components/utils/src/conditional_variable_boost.cc2
-rw-r--r--src/components/utils/src/convert_utils.cc2
-rw-r--r--src/components/utils/src/custom_string.cc10
-rw-r--r--src/components/utils/src/gen_hash.cc2
-rw-r--r--src/components/utils/src/logger.cc2
-rw-r--r--src/components/utils/src/qdb_wrapper/sql_database.cc2
-rw-r--r--src/components/utils/src/qdb_wrapper/sql_query.cc4
-rw-r--r--src/components/utils/src/resource_usage.cc4
-rw-r--r--src/components/utils/src/rwlock_posix.cc2
-rw-r--r--src/components/utils/src/signals_posix.cc2
-rw-r--r--src/components/utils/src/system.cc12
-rw-r--r--src/components/utils/src/threads/async_runner.cc2
-rw-r--r--src/components/utils/src/threads/pulse_thread_delegate.cc2
-rw-r--r--src/components/utils/src/threads/thread_delegate.cc2
-rw-r--r--src/components/utils/src/threads/thread_manager.cc8
-rw-r--r--src/components/utils/src/threads/thread_posix.cc14
-rw-r--r--src/components/utils/src/threads/thread_validator.cc17
-rw-r--r--src/components/utils/src/timer.cc8
-rw-r--r--src/components/utils/test/async_runner_test.cc10
-rw-r--r--src/components/utils/test/auto_trace_test.cc14
-rw-r--r--src/components/utils/test/back_trace_test.cc2
-rw-r--r--src/components/utils/test/bitstream_test.cc2
-rw-r--r--src/components/utils/test/custom_string_test.cc2
-rw-r--r--src/components/utils/test/data_accessor_test.cc2
-rw-r--r--src/components/utils/test/date_time_test.cc2
-rw-r--r--src/components/utils/test/file_system_test.cc4
-rw-r--r--src/components/utils/test/generated_code_with_sqlite_test.cc2
-rw-r--r--src/components/utils/test/include/utils/generated_code_with_sqlite_test.h2
-rw-r--r--src/components/utils/test/include/utils/mock_signals_posix.h4
-rw-r--r--src/components/utils/test/log_message_loop_thread_test.cc4
-rw-r--r--src/components/utils/test/message_queue_test.cc2
-rw-r--r--src/components/utils/test/messagemeter_test.cc64
-rw-r--r--src/components/utils/test/mock_signals_posix.cc4
-rw-r--r--src/components/utils/test/posix_thread_test.cc2
-rw-r--r--src/components/utils/test/prioritized_queue_test.cc2
-rw-r--r--src/components/utils/test/qdb_wrapper/sql_database_test.cc4
-rw-r--r--src/components/utils/test/qdb_wrapper/sql_query_test.cc4
-rw-r--r--src/components/utils/test/resource_usage_test.cc4
-rw-r--r--src/components/utils/test/scope_guard_test.cc10
-rw-r--r--src/components/utils/test/singleton_test.cc2
-rw-r--r--src/components/utils/test/sqlite_wrapper/sql_database_test.cc62
-rw-r--r--src/components/utils/test/sqlite_wrapper/sql_query_test.cc6
-rw-r--r--src/components/utils/test/stl_utils_test.cc4
-rw-r--r--src/components/utils/test/system_test.cc2
-rw-r--r--src/components/utils/test/test_generator/generated_msg_version_test.cc4
-rw-r--r--src/components/utils/test/timer_test.cc4
62 files changed, 201 insertions, 200 deletions
diff --git a/src/components/utils/include/utils/back_trace.h b/src/components/utils/include/utils/back_trace.h
index 180714e5a6..f23f87e60c 100644
--- a/src/components/utils/include/utils/back_trace.h
+++ b/src/components/utils/include/utils/back_trace.h
@@ -33,8 +33,8 @@
#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_BACK_TRACE_H_
#include <ostream>
-#include <vector>
#include <string>
+#include <vector>
#include "utils/threads/thread.h"
namespace utils {
diff --git a/src/components/utils/include/utils/file_system.h b/src/components/utils/include/utils/file_system.h
index e6e5fdc0d4..f62858417d 100644
--- a/src/components/utils/include/utils/file_system.h
+++ b/src/components/utils/include/utils/file_system.h
@@ -35,11 +35,11 @@
#include <stdint.h>
#include <string.h>
+#include <time.h>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
-#include <time.h>
namespace file_system {
diff --git a/src/components/utils/include/utils/helpers.h b/src/components/utils/include/utils/helpers.h
index f13d69aa83..1ef336dadd 100644
--- a/src/components/utils/include/utils/helpers.h
+++ b/src/components/utils/include/utils/helpers.h
@@ -132,6 +132,6 @@ bool in_range(const Container& container,
return std::find(container.begin(), container.end(), value) !=
container.end();
}
-}
+} // namespace helpers
#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_HELPERS_H_
diff --git a/src/components/utils/include/utils/log_message_loop_thread.h b/src/components/utils/include/utils/log_message_loop_thread.h
index b20b43c251..b0cac75c71 100644
--- a/src/components/utils/include/utils/log_message_loop_thread.h
+++ b/src/components/utils/include/utils/log_message_loop_thread.h
@@ -33,9 +33,9 @@
#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_LOG_MESSAGE_LOOP_THREAD_H_
#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_LOG_MESSAGE_LOOP_THREAD_H_
-#include <string>
-#include <queue>
#include <log4cxx/logger.h>
+#include <queue>
+#include <string>
#include "utils/macro.h"
#include "utils/threads/message_loop_thread.h"
diff --git a/src/components/utils/include/utils/optional.h b/src/components/utils/include/utils/optional.h
index 0395945de0..626c166a02 100644
--- a/src/components/utils/include/utils/optional.h
+++ b/src/components/utils/include/utils/optional.h
@@ -79,5 +79,5 @@ class Optional {
bool is_initialized_;
};
-} // utils utils
+} // namespace utils
#endif // ERROR_OR_H
diff --git a/src/components/utils/include/utils/qdb_wrapper/sql_query.h b/src/components/utils/include/utils/qdb_wrapper/sql_query.h
index bc3e7a592b..b324fd5d40 100644
--- a/src/components/utils/include/utils/qdb_wrapper/sql_query.h
+++ b/src/components/utils/include/utils/qdb_wrapper/sql_query.h
@@ -33,11 +33,11 @@
#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_QDB_WRAPPER_SQL_QUERY_H_
#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_QDB_WRAPPER_SQL_QUERY_H_
-#include <stdint.h>
#include <qdb/qdb.h>
+#include <stdint.h>
#include <string>
-#include <vector>
#include <utility>
+#include <vector>
#include "qdb_wrapper/sql_error.h"
#include "utils/lock.h"
diff --git a/src/components/utils/include/utils/resource_usage.h b/src/components/utils/include/utils/resource_usage.h
index d358c49225..d34897eded 100644
--- a/src/components/utils/include/utils/resource_usage.h
+++ b/src/components/utils/include/utils/resource_usage.h
@@ -38,9 +38,9 @@
#include <sys/procfs.h>
#endif
-#include "utils/macro.h"
-#include <string>
#include <iostream>
+#include <string>
+#include "utils/macro.h"
#include "utils/logger.h"
@@ -171,6 +171,6 @@ class Resources {
*/
static const char* proc;
};
-}
+} // namespace utils
#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_RESOURCE_USAGE_H_
diff --git a/src/components/utils/include/utils/singleton.h b/src/components/utils/include/utils/singleton.h
index b73780ee1d..54fc113aba 100644
--- a/src/components/utils/include/utils/singleton.h
+++ b/src/components/utils/include/utils/singleton.h
@@ -33,9 +33,9 @@
#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_SINGLETON_H_
#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_SINGLETON_H_
+#include "utils/atomic.h"
#include "utils/lock.h"
#include "utils/memory_barrier.h"
-#include "utils/atomic.h"
namespace utils {
diff --git a/src/components/utils/include/utils/sqlite_wrapper/sql_database.h b/src/components/utils/include/utils/sqlite_wrapper/sql_database.h
index f68c5e215e..1bedbea01e 100644
--- a/src/components/utils/include/utils/sqlite_wrapper/sql_database.h
+++ b/src/components/utils/include/utils/sqlite_wrapper/sql_database.h
@@ -34,8 +34,8 @@
#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_SQLITE_WRAPPER_SQL_DATABASE_H_
#include <string>
-#include "utils/sqlite_wrapper/sql_error.h"
#include "utils/lock.h"
+#include "utils/sqlite_wrapper/sql_error.h"
struct sqlite3;
diff --git a/src/components/utils/include/utils/sqlite_wrapper/sql_query.h b/src/components/utils/include/utils/sqlite_wrapper/sql_query.h
index dc45be7ed1..e7fe75f9c9 100644
--- a/src/components/utils/include/utils/sqlite_wrapper/sql_query.h
+++ b/src/components/utils/include/utils/sqlite_wrapper/sql_query.h
@@ -35,8 +35,8 @@
#include <stdint.h>
#include <string>
-#include "utils/sqlite_wrapper/sql_error.h"
#include "utils/lock.h"
+#include "utils/sqlite_wrapper/sql_error.h"
struct sqlite3_stmt;
diff --git a/src/components/utils/include/utils/system.h b/src/components/utils/include/utils/system.h
index 3b34d78526..f975f74510 100644
--- a/src/components/utils/include/utils/system.h
+++ b/src/components/utils/include/utils/system.h
@@ -91,6 +91,6 @@ class System {
std::vector<std::string> argv_;
};
-} // utils
+} // namespace utils
#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_SYSTEM_H_
diff --git a/src/components/utils/include/utils/threads/pulse_thread_delegate.h b/src/components/utils/include/utils/threads/pulse_thread_delegate.h
index 623e12b261..ad6df6fca7 100644
--- a/src/components/utils/include/utils/threads/pulse_thread_delegate.h
+++ b/src/components/utils/include/utils/threads/pulse_thread_delegate.h
@@ -55,23 +55,23 @@ namespace threads {
class PulseThreadDelegate : public ThreadDelegate {
public:
/**
- * @brief default constructor
- */
+ * @brief default constructor
+ */
PulseThreadDelegate();
virtual void threadMain();
virtual void exitThreadMain();
protected:
/**
- * @brief This method is to be implemented to arm events of interest
- * @param event pointer to structure sigevent
- * @return If this method returns true, thread is blocked on
+ * @brief This method is to be implemented to arm events of interest
+ * @param event pointer to structure sigevent
+ * @return If this method returns true, thread is blocked on
* MsgReceivePulse() waiting for Pulse
- */
+ */
virtual bool ArmEvent(struct sigevent* event) = 0;
/**
- * @brief This method is invoked from threadMain() when Pulse comes
- */
+ * @brief This method is invoked from threadMain() when Pulse comes
+ */
virtual void OnPulse() = 0;
/**
@@ -83,9 +83,9 @@ class PulseThreadDelegate : public ThreadDelegate {
}
/**
- * Finalizes thread
- * Can free resources
- */
+ * Finalizes thread
+ * Can free resources
+ */
virtual void Finalize() {}
private:
diff --git a/src/components/utils/include/utils/threads/thread_manager.h b/src/components/utils/include/utils/threads/thread_manager.h
index 3f53c902c4..4f28d0cb15 100644
--- a/src/components/utils/include/utils/threads/thread_manager.h
+++ b/src/components/utils/include/utils/threads/thread_manager.h
@@ -37,16 +37,16 @@
#include <pthread.h>
+#include <list>
#include <map>
-#include <string>
#include <set>
-#include <list>
+#include <string>
-#include "utils/macro.h"
-#include "utils/singleton.h"
-#include "utils/lock.h"
#include "utils/conditional_variable.h"
+#include "utils/lock.h"
+#include "utils/macro.h"
#include "utils/message_queue.h"
+#include "utils/singleton.h"
#include "utils/threads/thread.h"
#include "utils/threads/thread_delegate.h"
diff --git a/src/components/utils/include/utils/timer.h b/src/components/utils/include/utils/timer.h
index b012b97e6a..a47b52a030 100644
--- a/src/components/utils/include/utils/timer.h
+++ b/src/components/utils/include/utils/timer.h
@@ -32,15 +32,15 @@
#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_TIMER_H_
#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_TIMER_H_
-#include <string>
#include <stdint.h>
#include <memory>
+#include <string>
-#include "utils/macro.h"
#include "utils/lock.h"
-#include "utils/timer_task.h"
+#include "utils/macro.h"
#include "utils/threads/thread.h"
#include "utils/threads/thread_delegate.h"
+#include "utils/timer_task.h"
namespace timer {
diff --git a/src/components/utils/include/utils/timer_task_impl.h b/src/components/utils/include/utils/timer_task_impl.h
index 28618551ec..9ed6dd702d 100644
--- a/src/components/utils/include/utils/timer_task_impl.h
+++ b/src/components/utils/include/utils/timer_task_impl.h
@@ -33,8 +33,8 @@
#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_TIMER_TASK_IMPL_H_
#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_TIMER_TASK_IMPL_H_
-#include "utils/timer_task.h"
#include "utils/macro.h"
+#include "utils/timer_task.h"
namespace timer {
diff --git a/src/components/utils/src/back_trace.cc b/src/components/utils/src/back_trace.cc
index c587643cc6..65f9e72070 100644
--- a/src/components/utils/src/back_trace.cc
+++ b/src/components/utils/src/back_trace.cc
@@ -33,8 +33,8 @@
#include "utils/back_trace.h"
#include <algorithm>
-#include <vector>
#include <sstream>
+#include <vector>
#include <cxxabi.h>
#include <execinfo.h>
@@ -63,7 +63,7 @@ string demangle(const char* symbol) {
}
return symbol;
}
-}
+} // namespace
Backtrace::Backtrace(int32_t count, int32_t skip_top)
: thread_id_(threads::Thread::CurrentId()) {
diff --git a/src/components/utils/src/conditional_variable_boost.cc b/src/components/utils/src/conditional_variable_boost.cc
index a74aa3eaa6..c70b727d66 100644
--- a/src/components/utils/src/conditional_variable_boost.cc
+++ b/src/components/utils/src/conditional_variable_boost.cc
@@ -34,9 +34,9 @@
#include <errno.h>
#include <time.h>
+#include <boost/exception/diagnostic_information.hpp>
#include "utils/lock.h"
#include "utils/logger.h"
-#include <boost/exception/diagnostic_information.hpp>
namespace {
const long kNanosecondsPerSecond = 1000000000;
diff --git a/src/components/utils/src/convert_utils.cc b/src/components/utils/src/convert_utils.cc
index 319b231a96..9d90318731 100644
--- a/src/components/utils/src/convert_utils.cc
+++ b/src/components/utils/src/convert_utils.cc
@@ -32,8 +32,8 @@
#include "utils/convert_utils.h"
#include <stdint.h>
-#include <limits>
#include <algorithm>
+#include <limits>
#include "utils/macro.h"
long long int utils::ConvertInt64ToLongLongInt(const int64_t value) {
diff --git a/src/components/utils/src/custom_string.cc b/src/components/utils/src/custom_string.cc
index 8254a98180..7bbe5f2da8 100644
--- a/src/components/utils/src/custom_string.cc
+++ b/src/components/utils/src/custom_string.cc
@@ -31,14 +31,14 @@
*/
#include "utils/custom_string.h"
-#include <cwchar>
-#include <cstdlib>
+#include <string.h>
+#include <algorithm>
#include <clocale>
+#include <cstdlib>
+#include <cwchar>
#include <cwctype>
#include <new>
-#include <algorithm>
#include <vector>
-#include <string.h>
#include "utils/logger.h"
#include "utils/macro.h"
@@ -76,7 +76,7 @@ void ConvertWStringToLowerCase(std::wstring& str) {
std::transform(str.begin(), str.end(), str.begin(), towlower);
setlocale(LC_ALL, current_locale.c_str());
}
-}
+} // namespace
namespace utils {
namespace custom_string {
diff --git a/src/components/utils/src/gen_hash.cc b/src/components/utils/src/gen_hash.cc
index a43b8feb03..0b85798b00 100644
--- a/src/components/utils/src/gen_hash.cc
+++ b/src/components/utils/src/gen_hash.cc
@@ -32,8 +32,8 @@
#include "utils/gen_hash.h"
#include <cstdlib>
-#include <string>
#include <locale>
+#include <string>
#include "utils/custom_string.h"
namespace utils {
diff --git a/src/components/utils/src/logger.cc b/src/components/utils/src/logger.cc
index af21aeac77..2a4b8eb108 100644
--- a/src/components/utils/src/logger.cc
+++ b/src/components/utils/src/logger.cc
@@ -31,9 +31,9 @@
*/
#include "utils/logger.h"
+#include <apr_time.h>
#include "utils/log_message_loop_thread.h"
#include "utils/logger_status.h"
-#include <apr_time.h>
void deinit_logger() {
CREATE_LOGGERPTR_LOCAL(logger_, "Utils")
diff --git a/src/components/utils/src/qdb_wrapper/sql_database.cc b/src/components/utils/src/qdb_wrapper/sql_database.cc
index b95fe17845..e2a51753b2 100644
--- a/src/components/utils/src/qdb_wrapper/sql_database.cc
+++ b/src/components/utils/src/qdb_wrapper/sql_database.cc
@@ -30,8 +30,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <cstring>
#include "qdb_wrapper/sql_database.h"
+#include <cstring>
#include "utils/logger.h"
namespace utils {
diff --git a/src/components/utils/src/qdb_wrapper/sql_query.cc b/src/components/utils/src/qdb_wrapper/sql_query.cc
index e5facb5853..d101e80718 100644
--- a/src/components/utils/src/qdb_wrapper/sql_query.cc
+++ b/src/components/utils/src/qdb_wrapper/sql_query.cc
@@ -31,12 +31,12 @@
*/
#include "qdb_wrapper/sql_query.h"
+#include <errno.h>
#include <string.h>
-#include <cassert>
#include <algorithm>
+#include <cassert>
#include "qdb_wrapper/sql_database.h"
#include "utils/logger.h"
-#include <errno.h>
namespace utils {
namespace dbms {
diff --git a/src/components/utils/src/resource_usage.cc b/src/components/utils/src/resource_usage.cc
index 385c2bfa2e..15a8c71e70 100644
--- a/src/components/utils/src/resource_usage.cc
+++ b/src/components/utils/src/resource_usage.cc
@@ -10,11 +10,11 @@
#include <sys/types.h>
#include <unistd.h>
#endif
-#include <sys/resource.h>
#include <errno.h>
+#include <stdio.h>
+#include <sys/resource.h>
#include <sys/types.h>
#include <unistd.h>
-#include <stdio.h>
#include <sstream>
#include "utils/file_system.h"
diff --git a/src/components/utils/src/rwlock_posix.cc b/src/components/utils/src/rwlock_posix.cc
index 08edb8cb0c..81bf5feee1 100644
--- a/src/components/utils/src/rwlock_posix.cc
+++ b/src/components/utils/src/rwlock_posix.cc
@@ -30,8 +30,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "utils/rwlock.h"
#include "utils/logger.h"
+#include "utils/rwlock.h"
namespace sync_primitives {
diff --git a/src/components/utils/src/signals_posix.cc b/src/components/utils/src/signals_posix.cc
index e13dc04f40..8d1134576f 100644
--- a/src/components/utils/src/signals_posix.cc
+++ b/src/components/utils/src/signals_posix.cc
@@ -29,10 +29,10 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include <stdint.h>
#include <sys/wait.h>
#include <csignal>
#include <cstdlib>
-#include <stdint.h>
#include <iostream>
#include "utils/signals.h"
diff --git a/src/components/utils/src/system.cc b/src/components/utils/src/system.cc
index 6c3cf56133..2acc7acf92 100644
--- a/src/components/utils/src/system.cc
+++ b/src/components/utils/src/system.cc
@@ -32,16 +32,16 @@
#ifdef __QNX__
#include <process.h>
#else // __QNX__
+#include <fcntl.h>
+#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
-#include <sys/stat.h>
-#include <fcntl.h>
#include <unistd.h>
#endif // __QNX__
#include <algorithm>
-#include <functional>
#include <cstring>
+#include <functional>
#include <iostream>
#include "utils/logger.h"
@@ -87,7 +87,7 @@ bool System::Execute() {
bool System::Execute(bool wait) {
size_t size = argv_.size();
- char** argv = new char* [size + 1];
+ char** argv = new char*[size + 1];
std::transform(argv_.begin(), argv_.end(), argv, GetCString());
argv[size] = NULL;
@@ -137,7 +137,7 @@ bool System::Execute(bool wait) {
dup2(fd_dev0, STDERR_FILENO);
size_t size = argv_.size();
- char** argv = new char* [size + 1];
+ char** argv = new char*[size + 1];
std::transform(argv_.begin(), argv_.end(), argv, GetCString());
argv[size] = NULL;
@@ -173,4 +173,4 @@ bool System::Execute(bool wait) {
#endif // __QNX__
-} // utils
+} // namespace utils
diff --git a/src/components/utils/src/threads/async_runner.cc b/src/components/utils/src/threads/async_runner.cc
index 131aaa3f78..740db016be 100644
--- a/src/components/utils/src/threads/async_runner.cc
+++ b/src/components/utils/src/threads/async_runner.cc
@@ -110,4 +110,4 @@ void AsyncRunner::AsyncRunnerDelegate::runDelegate(ThreadDelegate* delegate) {
delegate_notifier_.NotifyOne();
}
-} // namespace policy.
+} // namespace threads
diff --git a/src/components/utils/src/threads/pulse_thread_delegate.cc b/src/components/utils/src/threads/pulse_thread_delegate.cc
index 37e6c670d1..a76b17368a 100644
--- a/src/components/utils/src/threads/pulse_thread_delegate.cc
+++ b/src/components/utils/src/threads/pulse_thread_delegate.cc
@@ -32,8 +32,8 @@
#include <sys/netmgr.h>
-#include "utils/threads/pulse_thread_delegate.h"
#include "utils/logger.h"
+#include "utils/threads/pulse_thread_delegate.h"
namespace threads {
diff --git a/src/components/utils/src/threads/thread_delegate.cc b/src/components/utils/src/threads/thread_delegate.cc
index 917603f92c..e071959522 100644
--- a/src/components/utils/src/threads/thread_delegate.cc
+++ b/src/components/utils/src/threads/thread_delegate.cc
@@ -34,8 +34,8 @@
#include <pthread.h>
-#include "utils/threads/thread.h"
#include "utils/lock.h"
+#include "utils/threads/thread.h"
namespace threads {
diff --git a/src/components/utils/src/threads/thread_manager.cc b/src/components/utils/src/threads/thread_manager.cc
index 2959a86cb7..8825510d74 100644
--- a/src/components/utils/src/threads/thread_manager.cc
+++ b/src/components/utils/src/threads/thread_manager.cc
@@ -31,16 +31,16 @@
*/
#include "utils/threads/thread_manager.h"
-#include "utils/threads/thread_delegate.h"
-#include "utils/lock.h"
#include "utils/conditional_variable.h"
-#include "utils/threads/thread.h"
+#include "utils/lock.h"
#include "utils/logger.h"
+#include "utils/threads/thread.h"
+#include "utils/threads/thread_delegate.h"
#include <pthread.h>
-#include <sstream>
#include <list>
+#include <sstream>
#if defined(OS_LINUX)
#include <sys/syscall.h>
diff --git a/src/components/utils/src/threads/thread_posix.cc b/src/components/utils/src/threads/thread_posix.cc
index 51e59fa108..35c1cd7084 100644
--- a/src/components/utils/src/threads/thread_posix.cc
+++ b/src/components/utils/src/threads/thread_posix.cc
@@ -32,16 +32,16 @@
#include <errno.h>
#include <limits.h>
-#include <stddef.h>
-#include <signal.h>
#include <pthread.h>
+#include <signal.h>
+#include <stddef.h>
#include <algorithm>
#include <functional>
-#include "utils/threads/thread.h"
#include "utils/atomic.h"
-#include "utils/threads/thread_delegate.h"
#include "utils/logger.h"
+#include "utils/threads/thread.h"
+#include "utils/threads/thread_delegate.h"
#ifndef __QNXNTO__
const int EOK = 0;
@@ -172,9 +172,9 @@ bool Thread::start(const ThreadOptions& options) {
}
if (isThreadRunning_) {
- LOG4CXX_TRACE(logger_,
- "EXIT thread " << name_ << " #" << handle_
- << " is already running");
+ LOG4CXX_TRACE(
+ logger_,
+ "EXIT thread " << name_ << " #" << handle_ << " is already running");
return true;
}
diff --git a/src/components/utils/src/threads/thread_validator.cc b/src/components/utils/src/threads/thread_validator.cc
index 4024522ae4..3b753e79b5 100644
--- a/src/components/utils/src/threads/thread_validator.cc
+++ b/src/components/utils/src/threads/thread_validator.cc
@@ -31,8 +31,8 @@
*/
#include "utils/threads/thread_validator.h"
-#include "utils/logger.h"
#include "utils/back_trace.h"
+#include "utils/logger.h"
namespace threads {
@@ -46,14 +46,15 @@ SingleThreadSimpleValidator::~SingleThreadSimpleValidator() {}
void SingleThreadSimpleValidator::AssertRunningOnCreationThread() const {
PlatformThreadHandle current_id = Thread::CurrentId();
if (creation_thread_id_ != current_id) {
- LOG4CXX_ERROR(logger_,
- "Single-threaded object created at thread "
- << creation_thread_id_ << " is accessed from thread "
- << current_id
+ LOG4CXX_ERROR(
+ logger_,
+ "Single-threaded object created at thread "
+ << creation_thread_id_ << " is accessed from thread " << current_id
#ifdef BACKTRACE_SUPPORT
- << "\n" << utils::Backtrace()
+ << "\n"
+ << utils::Backtrace()
#endif
- );
+ );
}
}
@@ -80,7 +81,7 @@ void SingleThreadValidator::AssertRunningOnValidThread() const {
#ifdef BACKTRACE_SUPPORT
<< utils::Backtrace()
#endif
- );
+ );
}
}
diff --git a/src/components/utils/src/timer.cc b/src/components/utils/src/timer.cc
index 68693dfc55..8e854654de 100644
--- a/src/components/utils/src/timer.cc
+++ b/src/components/utils/src/timer.cc
@@ -33,13 +33,13 @@
#include <string>
-#include "utils/macro.h"
-#include "utils/logger.h"
-#include "utils/lock.h"
-#include "utils/timer_task.h"
#include "utils/conditional_variable.h"
+#include "utils/lock.h"
+#include "utils/logger.h"
+#include "utils/macro.h"
#include "utils/threads/thread.h"
#include "utils/threads/thread_delegate.h"
+#include "utils/timer_task.h"
CREATE_LOGGERPTR_GLOBAL(logger_, "Utils")
diff --git a/src/components/utils/test/async_runner_test.cc b/src/components/utils/test/async_runner_test.cc
index f01dad8d58..e26f80d954 100644
--- a/src/components/utils/test/async_runner_test.cc
+++ b/src/components/utils/test/async_runner_test.cc
@@ -30,15 +30,15 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "utils/threads/async_runner.h"
#include <stdlib.h>
#include <ctime>
#include <memory>
-#include "utils/lock.h"
-#include "utils/threads/async_runner.h"
#include "utils/conditional_variable.h"
+#include "utils/lock.h"
-#include "gtest/gtest.h"
#include "gmock/gmock.h"
+#include "gtest/gtest.h"
namespace test {
namespace components {
@@ -49,7 +49,7 @@ using namespace threads;
namespace {
size_t kCheckValue = 0u;
const size_t kDelegatesAmount = 4u;
-}
+} // namespace
// ThreadDelegate successor
class TestThreadDelegate : public ThreadDelegate {
@@ -93,7 +93,7 @@ class AsyncRunnerTest : public ::testing::Test {
std::shared_ptr<AsyncRunner> async_runner_;
void CreateThreadsArray() {
- delegates_ = new ThreadDelegate* [kDelegatesAmount];
+ delegates_ = new ThreadDelegate*[kDelegatesAmount];
}
void DeleteThreadsArray() {
diff --git a/src/components/utils/test/auto_trace_test.cc b/src/components/utils/test/auto_trace_test.cc
index 1290ce7e96..41dc90cae4 100644
--- a/src/components/utils/test/auto_trace_test.cc
+++ b/src/components/utils/test/auto_trace_test.cc
@@ -30,19 +30,19 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <fstream>
#include <ctime>
+#include <fstream>
#include "gtest/gtest.h"
#include "utils/auto_trace.h"
-#include "utils/logger.h"
+#include "utils/date_time.h"
+#include "utils/file_system.h"
+#include "utils/helpers.h"
#include "utils/log_message_loop_thread.h"
+#include "utils/logger.h"
+#include "utils/logger_status.h"
#include "utils/threads/message_loop_thread.h"
-#include "utils/file_system.h"
#include "utils/threads/thread.h"
-#include "utils/date_time.h"
-#include "utils/logger_status.h"
-#include "utils/helpers.h"
namespace test {
namespace components {
@@ -115,7 +115,7 @@ bool CheckAutoTraceDebugInFile(const std::string& debug_message) {
bool trace_exit = false;
for (std::string line;
Compare<bool, EQ, ONE>(false, debug_found, trace_enter, trace_exit) &&
- getline(file_log, line);) {
+ getline(file_log, line);) {
debug_found = debug_found
? debug_found
: IsLogLineContains(line, debug_log_level, debug_message);
diff --git a/src/components/utils/test/back_trace_test.cc b/src/components/utils/test/back_trace_test.cc
index dcb2a79baa..2c8c61439b 100644
--- a/src/components/utils/test/back_trace_test.cc
+++ b/src/components/utils/test/back_trace_test.cc
@@ -30,8 +30,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "gtest/gtest.h"
#include "utils/back_trace.h"
+#include "gtest/gtest.h"
namespace test {
namespace components {
diff --git a/src/components/utils/test/bitstream_test.cc b/src/components/utils/test/bitstream_test.cc
index caec4b3970..3d20845dc4 100644
--- a/src/components/utils/test/bitstream_test.cc
+++ b/src/components/utils/test/bitstream_test.cc
@@ -30,10 +30,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "utils/bitstream.h"
#include <unistd.h>
#include "gtest/gtest.h"
#include "utils/macro.h"
-#include "utils/bitstream.h"
namespace test {
namespace components {
diff --git a/src/components/utils/test/custom_string_test.cc b/src/components/utils/test/custom_string_test.cc
index bca332be5a..cf03f6099f 100644
--- a/src/components/utils/test/custom_string_test.cc
+++ b/src/components/utils/test/custom_string_test.cc
@@ -30,10 +30,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "utils/custom_string.h"
#include <iostream>
#include <string>
#include "gtest/gtest.h"
-#include "utils/custom_string.h"
namespace custom_str = utils::custom_string;
diff --git a/src/components/utils/test/data_accessor_test.cc b/src/components/utils/test/data_accessor_test.cc
index 24b7bab282..b9d8f3b4f9 100644
--- a/src/components/utils/test/data_accessor_test.cc
+++ b/src/components/utils/test/data_accessor_test.cc
@@ -30,8 +30,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "gtest/gtest.h"
#include "utils/data_accessor.h"
+#include "gtest/gtest.h"
#include "utils/lock.h"
namespace test {
diff --git a/src/components/utils/test/date_time_test.cc b/src/components/utils/test/date_time_test.cc
index 00085813aa..4cde9a4fc4 100644
--- a/src/components/utils/test/date_time_test.cc
+++ b/src/components/utils/test/date_time_test.cc
@@ -30,9 +30,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "utils/date_time.h"
#include <boost/thread/thread.hpp>
#include "gtest/gtest.h"
-#include "utils/date_time.h"
namespace test {
namespace components {
diff --git a/src/components/utils/test/file_system_test.cc b/src/components/utils/test/file_system_test.cc
index eb35773fc9..3d518e599f 100644
--- a/src/components/utils/test/file_system_test.cc
+++ b/src/components/utils/test/file_system_test.cc
@@ -32,8 +32,8 @@
#include <algorithm>
#include <fstream>
-#include <vector>
#include <string>
+#include <vector>
#include "gtest/gtest.h"
#include "utils/file_system.h"
@@ -57,7 +57,7 @@ StringArray MergeStringsToArray(const std::string& first,
return array_of_strings;
}
-}
+} // namespace
TEST(FileSystemTest, CreateDeleteDirectory) {
ASSERT_FALSE(DirectoryExists("./Test directory"));
diff --git a/src/components/utils/test/generated_code_with_sqlite_test.cc b/src/components/utils/test/generated_code_with_sqlite_test.cc
index 1c829c838c..b75ec5c58f 100644
--- a/src/components/utils/test/generated_code_with_sqlite_test.cc
+++ b/src/components/utils/test/generated_code_with_sqlite_test.cc
@@ -29,9 +29,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "utils/generated_code_with_sqlite_test.h"
#include <sqlite3.h>
#include "gtest/gtest.h"
-#include "utils/generated_code_with_sqlite_test.h"
namespace test {
namespace components {
diff --git a/src/components/utils/test/include/utils/generated_code_with_sqlite_test.h b/src/components/utils/test/include/utils/generated_code_with_sqlite_test.h
index e21fd75f87..0e75b8ba87 100644
--- a/src/components/utils/test/include/utils/generated_code_with_sqlite_test.h
+++ b/src/components/utils/test/include/utils/generated_code_with_sqlite_test.h
@@ -35,8 +35,8 @@
#include <string>
#include "policy/policy_table/types.h"
#include "rpc_base/rpc_base.h"
-#include "utils/sqlite_wrapper/sql_query.h"
#include "utils/sqlite_wrapper/sql_database.h"
+#include "utils/sqlite_wrapper/sql_query.h"
namespace test {
namespace components {
diff --git a/src/components/utils/test/include/utils/mock_signals_posix.h b/src/components/utils/test/include/utils/mock_signals_posix.h
index 1aad2d5873..363708a668 100644
--- a/src/components/utils/test/include/utils/mock_signals_posix.h
+++ b/src/components/utils/test/include/utils/mock_signals_posix.h
@@ -33,10 +33,10 @@
#ifndef SRC_COMPONENTS_UTILS_TEST_INCLUDE_UTILS_MOCK_SIGNALS_POSIX_H_
#define SRC_COMPONENTS_UTILS_TEST_INCLUDE_UTILS_MOCK_SIGNALS_POSIX_H_
-#include "gmock/gmock.h"
-#include "utils/signals.h"
#include <signal.h>
#include "appMain/low_voltage_signals_handler.h"
+#include "gmock/gmock.h"
+#include "utils/signals.h"
namespace utils {
diff --git a/src/components/utils/test/log_message_loop_thread_test.cc b/src/components/utils/test/log_message_loop_thread_test.cc
index 92287fb45b..74b1f5094f 100644
--- a/src/components/utils/test/log_message_loop_thread_test.cc
+++ b/src/components/utils/test/log_message_loop_thread_test.cc
@@ -30,9 +30,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "gtest/gtest.h"
-#include "gmock/gmock.h"
#include "utils/log_message_loop_thread.h"
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
#include "utils/logger_status.h"
namespace test {
diff --git a/src/components/utils/test/message_queue_test.cc b/src/components/utils/test/message_queue_test.cc
index 9aa70933d6..b3c654420a 100644
--- a/src/components/utils/test/message_queue_test.cc
+++ b/src/components/utils/test/message_queue_test.cc
@@ -30,9 +30,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "utils/message_queue.h"
#include <unistd.h>
#include "gtest/gtest.h"
-#include "utils/message_queue.h"
namespace test {
namespace components {
diff --git a/src/components/utils/test/messagemeter_test.cc b/src/components/utils/test/messagemeter_test.cc
index d45e600034..fdfca113a8 100644
--- a/src/components/utils/test/messagemeter_test.cc
+++ b/src/components/utils/test/messagemeter_test.cc
@@ -1,44 +1,44 @@
/*
-* Copyright (c) 2015, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
+ * Copyright (c) 2015, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
#include <unistd.h>
-#include "gtest/gtest.h"
#include "gmock/gmock.h"
+#include "gtest/gtest.h"
#include "utils/macro.h"
-#include "utils/messagemeter.h"
#include "utils/date_time.h"
+#include "utils/messagemeter.h"
namespace test {
namespace components {
diff --git a/src/components/utils/test/mock_signals_posix.cc b/src/components/utils/test/mock_signals_posix.cc
index 47531b4a9f..93c08a690d 100644
--- a/src/components/utils/test/mock_signals_posix.cc
+++ b/src/components/utils/test/mock_signals_posix.cc
@@ -30,9 +30,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "gtest/gtest.h"
-#include "gmock/gmock.h"
#include "utils/mock_signals_posix.h"
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
#include "utils/signals.h"
namespace utils {
diff --git a/src/components/utils/test/posix_thread_test.cc b/src/components/utils/test/posix_thread_test.cc
index a44e1b9b89..4bf0c8c092 100644
--- a/src/components/utils/test/posix_thread_test.cc
+++ b/src/components/utils/test/posix_thread_test.cc
@@ -52,7 +52,7 @@ const char* threadName("test thread");
const std::string test_thread_name("THREAD");
sync_primitives::ConditionalVariable cond_var_;
sync_primitives::Lock test_mutex_;
-};
+}; // namespace
// ThreadDelegate successor
class TestThreadDelegate : public threads::ThreadDelegate {
diff --git a/src/components/utils/test/prioritized_queue_test.cc b/src/components/utils/test/prioritized_queue_test.cc
index 082ff56713..ed22c2db48 100644
--- a/src/components/utils/test/prioritized_queue_test.cc
+++ b/src/components/utils/test/prioritized_queue_test.cc
@@ -30,8 +30,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "gtest/gtest.h"
#include "utils/prioritized_queue.h"
+#include "gtest/gtest.h"
namespace test {
namespace components {
diff --git a/src/components/utils/test/qdb_wrapper/sql_database_test.cc b/src/components/utils/test/qdb_wrapper/sql_database_test.cc
index 4e1a822b57..33dfe69119 100644
--- a/src/components/utils/test/qdb_wrapper/sql_database_test.cc
+++ b/src/components/utils/test/qdb_wrapper/sql_database_test.cc
@@ -33,11 +33,11 @@
#include "gtest/gtest.h"
-#include "qdb_wrapper/sql_error.h"
#include "qdb_wrapper/sql_database.h"
+#include "qdb_wrapper/sql_error.h"
-using ::utils::dbms::SQLError;
using ::utils::dbms::SQLDatabase;
+using ::utils::dbms::SQLError;
namespace test {
namespace components {
diff --git a/src/components/utils/test/qdb_wrapper/sql_query_test.cc b/src/components/utils/test/qdb_wrapper/sql_query_test.cc
index e575e4f575..6279f4d8a1 100644
--- a/src/components/utils/test/qdb_wrapper/sql_query_test.cc
+++ b/src/components/utils/test/qdb_wrapper/sql_query_test.cc
@@ -34,12 +34,12 @@
#include "gtest/gtest.h"
-#include "qdb_wrapper/sql_error.h"
#include "qdb_wrapper/sql_database.h"
+#include "qdb_wrapper/sql_error.h"
#include "qdb_wrapper/sql_query.h"
-using ::utils::dbms::SQLError;
using ::utils::dbms::SQLDatabase;
+using ::utils::dbms::SQLError;
using ::utils::dbms::SQLQuery;
namespace test {
diff --git a/src/components/utils/test/resource_usage_test.cc b/src/components/utils/test/resource_usage_test.cc
index 96b4fe4b49..ac8825c841 100644
--- a/src/components/utils/test/resource_usage_test.cc
+++ b/src/components/utils/test/resource_usage_test.cc
@@ -34,8 +34,8 @@
#include "gtest/gtest.h"
#include "utils/macro.h"
-#include "utils/resource_usage.h"
#include "utils/file_system.h"
+#include "utils/resource_usage.h"
namespace utils {
@@ -80,7 +80,7 @@ TEST_F(ResourceUsagePrivateTest, GetProcPathTest) {
// assert
EXPECT_EQ(filename, fd + "/stat");
}
-}
+} // namespace utils
namespace test {
namespace components {
diff --git a/src/components/utils/test/scope_guard_test.cc b/src/components/utils/test/scope_guard_test.cc
index 5e685d6aba..1f9224effa 100644
--- a/src/components/utils/test/scope_guard_test.cc
+++ b/src/components/utils/test/scope_guard_test.cc
@@ -30,18 +30,18 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "gmock/gmock.h"
#include "utils/scope_guard.h"
+#include "gmock/gmock.h"
#include "utils/macro.h"
namespace test {
namespace components {
namespace utils_test {
-using ::utils::ScopeGuard;
+using ::testing::Mock;
using ::utils::MakeGuard;
using ::utils::MakeObjGuard;
-using ::testing::Mock;
+using ::utils::ScopeGuard;
class TestCalleeObject {
public:
@@ -55,7 +55,7 @@ void dealloc(char* ptr) {
delete ptr;
++call_with_param_count;
}
-}
+} // namespace
TEST(ScopeGuardTest, CallFreeFunctionWithParam) {
{
@@ -118,4 +118,4 @@ TEST(ScopeGuardTest, DismissCallObjectFunctionWithParam) {
} // namespace utils_test
} // namespace components
-} // namesapce test
+} // namespace test
diff --git a/src/components/utils/test/singleton_test.cc b/src/components/utils/test/singleton_test.cc
index ae05b6cbab..a38f51726c 100644
--- a/src/components/utils/test/singleton_test.cc
+++ b/src/components/utils/test/singleton_test.cc
@@ -30,9 +30,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "gtest/gtest.h"
#include "utils/singleton.h"
#include <pthread.h>
+#include "gtest/gtest.h"
namespace test {
namespace components {
diff --git a/src/components/utils/test/sqlite_wrapper/sql_database_test.cc b/src/components/utils/test/sqlite_wrapper/sql_database_test.cc
index 9732fbe078..0195e02121 100644
--- a/src/components/utils/test/sqlite_wrapper/sql_database_test.cc
+++ b/src/components/utils/test/sqlite_wrapper/sql_database_test.cc
@@ -1,40 +1,40 @@
/* Copyright (c) 2014, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "utils/sqlite_wrapper/sql_database.h"
#include "gtest/gtest.h"
#include "utils/sqlite_wrapper/sql_error.h"
-#include "utils/sqlite_wrapper/sql_database.h"
-using ::utils::dbms::SQLError;
using ::utils::dbms::SQLDatabase;
+using ::utils::dbms::SQLError;
namespace test {
namespace components {
diff --git a/src/components/utils/test/sqlite_wrapper/sql_query_test.cc b/src/components/utils/test/sqlite_wrapper/sql_query_test.cc
index c10c26a2c7..b2d3c747cd 100644
--- a/src/components/utils/test/sqlite_wrapper/sql_query_test.cc
+++ b/src/components/utils/test/sqlite_wrapper/sql_query_test.cc
@@ -29,17 +29,17 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <string>
#include <sqlite3.h>
+#include <string>
#include "gtest/gtest.h"
-#include "utils/sqlite_wrapper/sql_error.h"
#include "utils/sqlite_wrapper/sql_database.h"
+#include "utils/sqlite_wrapper/sql_error.h"
#include "utils/sqlite_wrapper/sql_query.h"
-using ::utils::dbms::SQLError;
using ::utils::dbms::SQLDatabase;
+using ::utils::dbms::SQLError;
using ::utils::dbms::SQLQuery;
namespace test {
diff --git a/src/components/utils/test/stl_utils_test.cc b/src/components/utils/test/stl_utils_test.cc
index 5250a7a514..c2701c1558 100644
--- a/src/components/utils/test/stl_utils_test.cc
+++ b/src/components/utils/test/stl_utils_test.cc
@@ -30,10 +30,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <vector>
+#include "utils/stl_utils.h"
#include <map>
+#include <vector>
#include "gtest/gtest.h"
-#include "utils/stl_utils.h"
namespace test {
namespace components {
diff --git a/src/components/utils/test/system_test.cc b/src/components/utils/test/system_test.cc
index b479823aa5..b9daa575ba 100644
--- a/src/components/utils/test/system_test.cc
+++ b/src/components/utils/test/system_test.cc
@@ -30,8 +30,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "gmock/gmock.h"
#include "utils/system.h"
+#include "gmock/gmock.h"
namespace test {
namespace components {
diff --git a/src/components/utils/test/test_generator/generated_msg_version_test.cc b/src/components/utils/test/test_generator/generated_msg_version_test.cc
index c9647dcad0..4d1d70a5d6 100644
--- a/src/components/utils/test/test_generator/generated_msg_version_test.cc
+++ b/src/components/utils/test/test_generator/generated_msg_version_test.cc
@@ -30,11 +30,11 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <iostream>
+#include "generated_msg_version.h"
#include <fstream>
+#include <iostream>
#include <string>
#include "gtest/gtest.h"
-#include "generated_msg_version.h"
#include "utils/file_system.h"
using namespace std;
diff --git a/src/components/utils/test/timer_test.cc b/src/components/utils/test/timer_test.cc
index ea5c9f0b84..d7b196876d 100644
--- a/src/components/utils/test/timer_test.cc
+++ b/src/components/utils/test/timer_test.cc
@@ -30,12 +30,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "gtest/gtest.h"
#include "utils/timer.h"
-#include "utils/mock_timer_task.h"
+#include "gtest/gtest.h"
#include "utils/conditional_variable.h"
#include "utils/lock.h"
#include "utils/macro.h"
+#include "utils/mock_timer_task.h"
#include "utils/timer_task_impl.h"
namespace test {