From 6913c6d965d64481ed09fc06a43154f35e8bd914 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 13 Jan 2020 08:39:02 +0300 Subject: clang-format all the code --- test/unit_tests/lexer.cpp | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) (limited to 'test/unit_tests/lexer.cpp') diff --git a/test/unit_tests/lexer.cpp b/test/unit_tests/lexer.cpp index c47e9f2..c43b879 100644 --- a/test/unit_tests/lexer.cpp +++ b/test/unit_tests/lexer.cpp @@ -9,8 +9,8 @@ #include #include -#include #include +#include #include #include @@ -135,7 +135,7 @@ const std::vector expected{ }}, }; -} +} // namespace get_tokens::valid namespace get_tokens::invalid { @@ -149,32 +149,29 @@ const std::vector error_msg{ "server error: lexer error: invalid input at: & 456", }; -} -} - -BOOST_DATA_TEST_CASE( - test_get_tokens_valid, - bdata::make(get_tokens::valid::input) ^ get_tokens::valid::expected, - input, - expected) { +} // namespace get_tokens::invalid +} // namespace +BOOST_DATA_TEST_CASE(test_get_tokens_valid, + bdata::make(get_tokens::valid::input) ^ get_tokens::valid::expected, + input, + expected) { Lexer lexer{input}; const auto actual = lexer.get_tokens(); - BOOST_CHECK_EQUAL_COLLECTIONS(actual.cbegin(), actual.cend(), - expected.m_tokens.cbegin(), - expected.m_tokens.cend()); + BOOST_CHECK_EQUAL_COLLECTIONS(actual.cbegin(), actual.cend(), expected.m_tokens.cbegin(), + expected.m_tokens.cend()); } -BOOST_DATA_TEST_CASE( - test_get_tokens_invalid, - bdata::make(get_tokens::invalid::input) ^ get_tokens::invalid::error_msg, - input, - error_msg) { - - BOOST_REQUIRE_THROW(do { - Lexer lexer{input}; - lexer.get_tokens(); - } while (0), LexerError); +BOOST_DATA_TEST_CASE(test_get_tokens_invalid, + bdata::make(get_tokens::invalid::input) ^ get_tokens::invalid::error_msg, + input, + error_msg) { + BOOST_REQUIRE_THROW( + do { + Lexer lexer{input}; + lexer.get_tokens(); + } while (0), + LexerError); try { Lexer lexer{input}; -- cgit v1.2.3