about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRasesh Patel <RasPat1@gmail.com>2019-06-10T22·07-0700
committerGitHub <noreply@github.com>2019-06-10T22·07-0700
commit56ffa78ce34095bae941f3cb95e25bdc3dc309ee (patch)
tree4d1fc8dceb70423c3db1afc6ddbb59ec14663165
parent361cb8a9db2f2130442389fd80593255be26d681 (diff)
The order of the operators in the struct should match the order of the test cases
This makes it a bit easier to follow the logic for anyone reading the tests as docs.
-rw-r--r--absl/types/variant_test.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/absl/types/variant_test.cc b/absl/types/variant_test.cc
index d702482768a4..2efaf21e4106 100644
--- a/absl/types/variant_test.cc
+++ b/absl/types/variant_test.cc
@@ -1793,8 +1793,8 @@ TEST(VariantTest, VisitSimple) {
   EXPECT_EQ("B", piece);
 
   struct StrLen {
-    int operator()(const std::string& s) const { return s.size(); }
     int operator()(const char* s) const { return strlen(s); }
+    int operator()(const std::string& s) const { return s.size(); }
   };
 
   v = "SomeStr";