diff options
author | Gil <mcg@google.com> | 2018-04-12 14:54:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-12 14:54:53 -0700 |
commit | 8876622b6fcebc21672bc263666b858b7e152b45 (patch) | |
tree | 053fe00a20207099c11c1464df25565a5f5cc3c6 /Firestore/core/test/firebase/firestore/model/field_path_test.cc | |
parent | 1397e4ae72ea3b8d16a9b44ed1235caca47b3d9e (diff) |
Add clang-tidy checks for Firestore (#1078)
* Add a .clang-tidy configuration for Firestore C++
* Fix clang-tidy warnings
* typedef -> using
* const ref + rvalue ref -> pass by value
* NULL -> nullptr
* remove useless default initializations
* remove useless const value-type parameter declarations (definitions
can still use them)
* use auto instead of repeating types in a cast
* Fix typos
* Address use of static method through instance warnings
* Address use after move warnings
Diffstat (limited to 'Firestore/core/test/firebase/firestore/model/field_path_test.cc')
-rw-r--r-- | Firestore/core/test/firebase/firestore/model/field_path_test.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Firestore/core/test/firebase/firestore/model/field_path_test.cc b/Firestore/core/test/firebase/firestore/model/field_path_test.cc index a5ae3b2..a215a96 100644 --- a/Firestore/core/test/firebase/firestore/model/field_path_test.cc +++ b/Firestore/core/test/firebase/firestore/model/field_path_test.cc @@ -47,7 +47,7 @@ TEST(FieldPath, Constructors) { EXPECT_EQ(path_from_list, copied); const FieldPath moved = std::move(copied); EXPECT_EQ(path_from_list, moved); - EXPECT_NE(copied, moved); + EXPECT_NE(copied, moved); // NOLINT: use after move intended EXPECT_EQ(empty_path, copied); } @@ -68,7 +68,7 @@ TEST(FieldPath, PopFirst) { const FieldPath bc{"Eros", "messages"}; const FieldPath c{"messages"}; const FieldPath empty; - const FieldPath abc_dupl{"rooms", "Eros", "messages"}; + const FieldPath abc_dup{"rooms", "Eros", "messages"}; EXPECT_NE(empty, c); EXPECT_NE(c, bc); @@ -77,7 +77,7 @@ TEST(FieldPath, PopFirst) { EXPECT_EQ(bc, abc.PopFirst()); EXPECT_EQ(c, abc.PopFirst(2)); EXPECT_EQ(empty, abc.PopFirst(3)); - EXPECT_EQ(abc_dupl, abc); + EXPECT_EQ(abc_dup, abc); } TEST(FieldPath, PopLast) { @@ -85,7 +85,7 @@ TEST(FieldPath, PopLast) { const FieldPath ab{"rooms", "Eros"}; const FieldPath a{"rooms"}; const FieldPath empty; - const FieldPath abc_dupl{"rooms", "Eros", "messages"}; + const FieldPath abc_dup{"rooms", "Eros", "messages"}; EXPECT_EQ(ab, abc.PopLast()); EXPECT_EQ(a, abc.PopLast().PopLast()); |