@@ -123,6 +123,7 @@ SUITE(oauth1_tests)
123123
124124#undef TEST_ACCESSOR
125125
126+ // clang-format off
126127 TEST_FIXTURE (oauth1_token_setup, oauth1_signature_base_string)
127128 {
128129 // Basic base string generation.
@@ -137,9 +138,9 @@ SUITE(oauth1_tests)
137138
138139 utility::string_t base_string = m_oauth1_config._build_signature_base_string (r, state);
139140 utility::string_t correct_base_string (
140- U (" POST&http%3A%2F%2Fexample.com%2Frequest&a%3Db%26c%3Dd%26oauth_consumer_key%3Dtest_key%26oauth_nonce%"
141- " 3DABCDEFGH%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D12345678%26oauth_token%3Dtest_"
142- " token%26oauth_version%3D1.0" ));
141+ U (" POST&http%3A%2F%2Fexample.com%2Frequest&a%3Db%26c%3Dd%26oauth_consumer_key%3Dtest_key%26oauth_nonce%" )
142+ U ( " 3DABCDEFGH%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D12345678%26oauth_token%3Dtest_" )
143+ U ( " token%26oauth_version%3D1.0" ));
143144 VERIFY_ARE_EQUAL (correct_base_string, base_string);
144145 }
145146
@@ -155,9 +156,9 @@ SUITE(oauth1_tests)
155156
156157 utility::string_t base_string = m_oauth1_config._build_signature_base_string (r, state);
157158 utility::string_t correct_base_string (
158- U (" POST&http%3A%2F%2Fexample.com%2Frequest&a%3Db%26c%3Dd%26oauth_consumer_key%3Dtest_key%26oauth_nonce%"
159- " 3DABCDEFGH%26oauth_signature_method%3DHMAC-SHA1%26oauth_test%3Dxyzzy%26oauth_timestamp%3D12345678%"
160- " 26oauth_token%3Dtest_token%26oauth_version%3D1.0" ));
159+ U (" POST&http%3A%2F%2Fexample.com%2Frequest&a%3Db%26c%3Dd%26oauth_consumer_key%3Dtest_key%26oauth_nonce%" )
160+ U ( " 3DABCDEFGH%26oauth_signature_method%3DHMAC-SHA1%26oauth_test%3Dxyzzy%26oauth_timestamp%3D12345678%" )
161+ U ( " 26oauth_token%3Dtest_token%26oauth_version%3D1.0" ));
161162 VERIFY_ARE_EQUAL (correct_base_string, base_string);
162163 }
163164
@@ -173,9 +174,9 @@ SUITE(oauth1_tests)
173174
174175 utility::string_t base_string = m_oauth1_config._build_signature_base_string (r, state);
175176 utility::string_t correct_base_string (
176- U (" POST&http%3A%2F%2Fexample.com%2Frequest&a%3Db%26c%3Dd%26MyVariableOne%3DValueOne%26%26MyVariableTwo%"
177- " 3DValueTwo%26oauth_consumer_key%3Dtest_key%26oauth_nonce%3DABCDEFGH%26oauth_signature_method%3DHMAC-"
178- " SHA1%26oauth_timestamp%3D12345678%26oauth_token%3Dtest_token%26oauth_version%3D1.0" ));
177+ U (" POST&http%3A%2F%2Fexample.com%2Frequest&a%3Db%26c%3Dd%26MyVariableOne%3DValueOne%26%26MyVariableTwo%" )
178+ U ( " 3DValueTwo%26oauth_consumer_key%3Dtest_key%26oauth_nonce%3DABCDEFGH%26oauth_signature_method%3DHMAC-" )
179+ U ( " SHA1%26oauth_timestamp%3D12345678%26oauth_token%3Dtest_token%26oauth_version%3D1.0" ));
179180 }
180181 }
181182
@@ -214,8 +215,8 @@ SUITE(oauth1_tests)
214215 m_server.server ()->next_request ().then ([](test_request* request) {
215216 const utility::string_t header_authorization (request->m_headers [header_names::authorization]);
216217 const utility::string_t prefix (
217- U (" OAuth oauth_version=\" 1.0\" , oauth_consumer_key=\" test_key\" , oauth_token=\" test_token\" , "
218- " oauth_signature_method=\" HMAC-SHA1\" , oauth_timestamp=\" " ));
218+ U (" OAuth oauth_version=\" 1.0\" , oauth_consumer_key=\" test_key\" , oauth_token=\" test_token\" , " )
219+ U ( " oauth_signature_method=\" HMAC-SHA1\" , oauth_timestamp=\" " ));
219220 VERIFY_ARE_EQUAL (0 , header_authorization.find (prefix));
220221 request->reply (status_codes::OK);
221222 });
@@ -237,8 +238,8 @@ SUITE(oauth1_tests)
237238 m_server.server ()->next_request ().then ([](test_request* request) {
238239 const utility::string_t header_authorization (request->m_headers [header_names::authorization]);
239240 const utility::string_t prefix (
240- U (" OAuth oauth_version=\" 1.0\" , oauth_consumer_key=\" test_key\" , oauth_token=\" test_token\" , "
241- " oauth_signature_method=\" PLAINTEXT\" , oauth_timestamp=\" " ));
241+ U (" OAuth oauth_version=\" 1.0\" , oauth_consumer_key=\" test_key\" , oauth_token=\" test_token\" , " )
242+ U ( " oauth_signature_method=\" PLAINTEXT\" , oauth_timestamp=\" " ));
242243 VERIFY_ARE_EQUAL (0 , header_authorization.find (prefix));
243244 request->reply (status_codes::OK);
244245 });
@@ -254,8 +255,8 @@ SUITE(oauth1_tests)
254255 const utility::string_t header_authorization (request->m_headers [header_names::authorization]);
255256
256257 // Verify prefix, and without 'oauth_token'.
257- const utility::string_t prefix (U (" OAuth oauth_version=\" 1.0\" , oauth_consumer_key=\" test_key\" , "
258- " oauth_signature_method=\" HMAC-SHA1\" , oauth_timestamp=\" " ));
258+ const utility::string_t prefix (U (" OAuth oauth_version=\" 1.0\" , oauth_consumer_key=\" test_key\" , " )
259+ U ( " oauth_signature_method=\" HMAC-SHA1\" , oauth_timestamp=\" " ));
259260 VERIFY_ARE_EQUAL (0 , header_authorization.find (prefix));
260261
261262 // Verify suffix with proper 'oauth_callback'.
@@ -285,8 +286,8 @@ SUITE(oauth1_tests)
285286
286287 // Verify temporary token prefix.
287288 const utility::string_t prefix (
288- U (" OAuth oauth_version=\" 1.0\" , oauth_consumer_key=\" test_key\" , oauth_token=\" xyzzy\" , "
289- " oauth_signature_method=\" HMAC-SHA1\" , oauth_timestamp=\" " ));
289+ U (" OAuth oauth_version=\" 1.0\" , oauth_consumer_key=\" test_key\" , oauth_token=\" xyzzy\" , " )
290+ U ( " oauth_signature_method=\" HMAC-SHA1\" , oauth_timestamp=\" " ));
290291 VERIFY_ARE_EQUAL (0 , header_authorization.find (prefix));
291292
292293 // Verify suffix with 'oauth_verifier'.
@@ -313,6 +314,8 @@ SUITE(oauth1_tests)
313314 VERIFY_ARE_EQUAL (m_oauth1_config.token ().secret (), U (" bar" ));
314315 }
315316
317+ // clang-format on
318+
316319} // SUITE(oauth1_tests)
317320
318321} // namespace client
0 commit comments