@@ -102,13 +102,15 @@ class FirebaseAuthTest : public FirebaseTest {
102102 void DeleteUser ();
103103
104104 // Passthrough method to the base class's WaitForCompletion.
105- bool WaitForCompletion (firebase::Future<std::string> future, const char * fn,
105+ bool WaitForCompletion (firebase::Future<std::string> future,
106+ const char * fn,
106107 int expected_error = firebase::auth::kAuthErrorNone ) {
107108 return FirebaseTest::WaitForCompletion (future, fn, expected_error);
108109 }
109110
110111 // Passthrough method to the base class's WaitForCompletion.
111- bool WaitForCompletion (firebase::Future<void > future, const char * fn,
112+ bool WaitForCompletion (firebase::Future<void > future,
113+ const char * fn,
112114 int expected_error = firebase::auth::kAuthErrorNone ) {
113115 return FirebaseTest::WaitForCompletion (future, fn, expected_error);
114116 }
@@ -125,7 +127,8 @@ class FirebaseAuthTest : public FirebaseTest {
125127 // Custom WaitForCompletion that checks if User and Provider ID matches
126128 // afterwards.
127129 bool WaitForCompletion (firebase::Future<firebase::auth::SignInResult> future,
128- const char * fn, const std::string& provider_id);
130+ const char * fn,
131+ const std::string& provider_id);
129132
130133 bool initialized_;
131134 firebase::auth::Auth* auth_;
@@ -198,7 +201,8 @@ void FirebaseAuthTest::Terminate() {
198201}
199202
200203bool FirebaseAuthTest::WaitForCompletion (
201- firebase::Future<firebase::auth::User*> future, const char * fn,
204+ firebase::Future<firebase::auth::User*> future,
205+ const char * fn,
202206 int expected_error) {
203207 bool succeeded = FirebaseTest::WaitForCompletion (future, fn, expected_error);
204208
@@ -216,7 +220,8 @@ bool FirebaseAuthTest::WaitForCompletion(
216220}
217221
218222bool FirebaseAuthTest::WaitForCompletion (
219- firebase::Future<firebase::auth::SignInResult> future, const char * fn,
223+ firebase::Future<firebase::auth::SignInResult> future,
224+ const char * fn,
220225 int expected_error) {
221226 bool succeeded = FirebaseTest::WaitForCompletion (future, fn, expected_error);
222227
@@ -235,7 +240,8 @@ bool FirebaseAuthTest::WaitForCompletion(
235240}
236241
237242bool FirebaseAuthTest::WaitForCompletion (
238- firebase::Future<firebase::auth::SignInResult> future, const char * fn,
243+ firebase::Future<firebase::auth::SignInResult> future,
244+ const char * fn,
239245 const std::string& provider_id) {
240246 bool succeeded = FirebaseTest::WaitForCompletion (future, fn);
241247 if (succeeded) {
@@ -320,7 +326,9 @@ class TestAuthStateListener : public firebase::auth::AuthStateListener {
320326 auth_states_.push_back (provider);
321327 }
322328 }
323- const std::vector<std::string>& auth_states () { return auth_states_; }
329+ const std::vector<std::string>& auth_states () {
330+ return auth_states_;
331+ }
324332
325333 private:
326334 std::vector<std::string> auth_states_;
@@ -350,7 +358,9 @@ class TestIdTokenListener : public firebase::auth::IdTokenListener {
350358 }
351359 }
352360
353- const std::vector<std::string>& token_states () { return token_states_; }
361+ const std::vector<std::string>& token_states () {
362+ return token_states_;
363+ }
354364
355365 private:
356366 std::vector<std::string> token_states_;
@@ -395,7 +405,8 @@ TEST_F(FirebaseAuthTest, TestTokensAndAuthStateListeners) {
395405
396406static std::string GenerateEmailAddress () {
397407 char time_string[22 ];
398- snprintf (time_string, 22 , " %d" , app_framework::GetCurrentTimeInMicroseconds ());
408+ snprintf (time_string, 22 , " %d" ,
409+ app_framework::GetCurrentTimeInMicroseconds ());
399410 std::string email = " random_user_" ;
400411 email.append (time_string);
401412 email.append (" @gmail.com" );
@@ -718,7 +729,7 @@ TEST_F(FirebaseAuthTest, TestWithCustomEmailAndPassword) {
718729 EXPECT_NE (auth_->current_user (), nullptr );
719730}
720731
721- #if ! defined(__linux__)
732+ #if !defined(__linux__)
722733// Test is disabled on linux due to the need to unlock the keystore.
723734TEST_F (FirebaseAuthTest, TestAuthPersistenceWithAnonymousSignin) {
724735 WaitForCompletion (auth_->SignInAnonymously (), " SignInAnonymously" );
@@ -734,7 +745,7 @@ TEST_F(FirebaseAuthTest, TestAuthPersistenceWithAnonymousSignin) {
734745}
735746#endif // ! defined(__linux__)
736747
737- #if ! defined(__linux__)
748+ #if !defined(__linux__)
738749// Test is disabled on linux due to the need to unlock the keychain.
739750TEST_F (FirebaseAuthTest, TestAuthPersistenceWithEmailSignin) {
740751 std::string email = GenerateEmailAddress ();
@@ -775,14 +786,14 @@ TEST_F(FirebaseAuthTest, TestAuthPersistenceWithEmailSignin) {
775786}
776787#endif // ! defined(__linux__)
777788
778-
779789class PhoneListener : public firebase ::auth::PhoneAuthProvider::Listener {
780790 public:
781791 PhoneListener ()
782792 : on_verification_complete_count_(0 ),
783793 on_verification_failed_count_ (0 ),
784794 on_code_sent_count_(0 ),
785- on_code_auto_retrieval_time_out_count_(0 ) {}
795+ on_code_auto_retrieval_time_out_count_(0 ) {
796+ }
786797
787798 void OnVerificationCompleted (firebase::auth::Credential credential) override {
788799 LogDebug (" PhoneListener: successful automatic verification." );
@@ -812,7 +823,9 @@ class PhoneListener : public firebase::auth::PhoneAuthProvider::Listener {
812823 on_code_auto_retrieval_time_out_count_++;
813824 }
814825
815- const std::string& verification_id () const { return verification_id_; }
826+ const std::string& verification_id () const {
827+ return verification_id_;
828+ }
816829 const firebase::auth::PhoneAuthProvider::ForceResendingToken&
817830 force_resending_token () const {
818831 return force_resending_token_;
@@ -823,7 +836,9 @@ class PhoneListener : public firebase::auth::PhoneAuthProvider::Listener {
823836 int on_verification_failed_count () const {
824837 return on_verification_failed_count_;
825838 }
826- int on_code_sent_count () const { return on_code_sent_count_; }
839+ int on_code_sent_count () const {
840+ return on_code_sent_count_;
841+ }
827842 int on_code_auto_retrieval_time_out_count () const {
828843 return on_code_auto_retrieval_time_out_count_;
829844 }
@@ -840,7 +855,9 @@ class PhoneListener : public firebase::auth::PhoneAuthProvider::Listener {
840855 on_code_auto_retrieval_time_out_count () == 0 ;
841856 }
842857
843- firebase::auth::Credential credential () { return credential_; }
858+ firebase::auth::Credential credential () {
859+ return credential_;
860+ }
844861
845862 private:
846863 std::string verification_id_;
@@ -867,7 +884,8 @@ TEST_F(FirebaseAuthTest, TestPhoneAuth) {
867884 LogDebug (" Calling VerifyPhoneNumber." );
868885 // Randomly choose one of the phone numbers to avoid collisions.
869886 const int random_phone_number =
870- app_framework::GetCurrentTimeInMicroseconds () % kPhoneAuthTestNumPhoneNumbers ;
887+ app_framework::GetCurrentTimeInMicroseconds () %
888+ kPhoneAuthTestNumPhoneNumbers ;
871889 phone_provider.VerifyPhoneNumber (
872890 kPhoneAuthTestPhoneNumbers [random_phone_number], kPhoneAuthTimeoutMs ,
873891 nullptr , &listener);
0 commit comments