You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jr...@apache.org on 2017/01/13 23:48:01 UTC

[5/9] incubator-impala git commit: IMPALA-4757: addendum: avoid double underscore in name

IMPALA-4757: addendum: avoid double underscore in name

Names containing double underscore are implementation-reserved.
E.g. a global macro called __status could in principle be defined
in a C++ system header.

Change-Id: I9b189fe1ec1e70e19b2fd0ed8b183b7569e5fd05
Reviewed-on: http://gerrit.cloudera.org:8080/5702
Reviewed-by: Jim Apple <jb...@apache.org>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/60a67cb7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/60a67cb7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/60a67cb7

Branch: refs/heads/master
Commit: 60a67cb7c12aea34d5ff8b89342893eeca8cb60b
Parents: 89a3d3c
Author: Tim Armstrong <ta...@cloudera.com>
Authored: Thu Jan 12 15:27:07 2017 -0800
Committer: Impala Public Jenkins <im...@gerrit.cloudera.org>
Committed: Fri Jan 13 04:46:05 2017 +0000

----------------------------------------------------------------------
 be/src/testutil/gtest-util.h | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/60a67cb7/be/src/testutil/gtest-util.h
----------------------------------------------------------------------
diff --git a/be/src/testutil/gtest-util.h b/be/src/testutil/gtest-util.h
index 8e0257a..c7bfc56 100644
--- a/be/src/testutil/gtest-util.h
+++ b/be/src/testutil/gtest-util.h
@@ -25,22 +25,22 @@
 namespace impala {
 
 // Macros for backend tests to be used when we expect the status to be OK.
-#define EXPECT_OK(status)                                            \
-  do {                                                               \
-    const Status& __status = (status);                               \
-    EXPECT_TRUE(__status.ok()) << "Error: " << __status.GetDetail(); \
+#define EXPECT_OK(status)                                          \
+  do {                                                             \
+    const Status& status_ = (status);                              \
+    EXPECT_TRUE(status_.ok()) << "Error: " << status_.GetDetail(); \
   } while (0)
 
-#define ASSERT_OK(status)                                            \
-  do {                                                               \
-    const Status& __status = (status);                               \
-    ASSERT_TRUE(__status.ok()) << "Error: " << __status.GetDetail(); \
+#define ASSERT_OK(status)                                          \
+  do {                                                             \
+    const Status& status_ = (status);                              \
+    ASSERT_TRUE(status_.ok()) << "Error: " << status_.GetDetail(); \
   } while (0)
 
-#define EXPECT_ERROR(status, err)                                         \
-  do {                                                                    \
-    const Status& __status = (status);                                    \
-    EXPECT_EQ(__status.code(), err) << "Error: " << __status.GetDetail(); \
+#define EXPECT_ERROR(status, err)                                       \
+  do {                                                                  \
+    const Status& status_ = (status);                                   \
+    EXPECT_EQ(status_.code(), err) << "Error: " << status_.GetDetail(); \
   } while (0)
 
 // Basic main() function to be used in gtest unit tests. Does not start a JVM and does