IMPALA-4258: Remove duplicated and unused test macros Macros defined in test-macros.h are either duplicated in gtest-util.h or are unused anywhere in the code. This change deletes test-macros.h
Change-Id: I08539d7e46b89d7e0a4338510b65f9867814c275 Reviewed-on: http://gerrit.cloudera.org:8080/4917 Reviewed-by: Tim Armstrong <[email protected]> Tested-by: Internal 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/f3d23be4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/f3d23be4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/f3d23be4 Branch: refs/heads/hadoop-next Commit: f3d23be47871a4abefebca1f035d98ecc9203208 Parents: 4af2ea4 Author: aphadke <[email protected]> Authored: Wed Nov 2 11:57:15 2016 -0700 Committer: Internal Jenkins <[email protected]> Committed: Wed Nov 9 01:23:41 2016 +0000 ---------------------------------------------------------------------- be/src/runtime/tmp-file-mgr-test.cc | 2 +- be/src/testutil/test-macros.h | 55 -------------------------------- 2 files changed, 1 insertion(+), 56 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/f3d23be4/be/src/runtime/tmp-file-mgr-test.cc ---------------------------------------------------------------------- diff --git a/be/src/runtime/tmp-file-mgr-test.cc b/be/src/runtime/tmp-file-mgr-test.cc index cdd0d2d..828e637 100644 --- a/be/src/runtime/tmp-file-mgr-test.cc +++ b/be/src/runtime/tmp-file-mgr-test.cc @@ -24,7 +24,7 @@ #include "common/init.h" #include "runtime/tmp-file-mgr.h" #include "service/fe-support.h" -#include "testutil/test-macros.h" +#include "testutil/gtest-util.h" #include "util/filesystem-util.h" #include "util/metrics.h" http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/f3d23be4/be/src/testutil/test-macros.h ---------------------------------------------------------------------- diff --git a/be/src/testutil/test-macros.h b/be/src/testutil/test-macros.h deleted file mode 100644 index 1cd2f45..0000000 --- a/be/src/testutil/test-macros.h +++ /dev/null @@ -1,55 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -#ifndef IMPALA_TESTUTIL_TEST_MACROS_H -#define IMPALA_TESTUTIL_TEST_MACROS_H - -#include <string> - -// Helper macros for tests. -// Follows conventions on gtest.h. - -// On a non-OK status, adds a failure but doesn't fail the test immediately. -#define EXPECT_OK(status) do { \ - Status _s = status; \ - if (_s.ok()) { \ - SUCCEED(); \ - } else { \ - ADD_FAILURE() << "Bad status: " << _s.GetDetail(); \ - } \ - } while (0); - -// On a non-OK status, fails the test immediately. On an OK status records -// success. -#define ASSERT_OK(status) do { \ - Status _s = status; \ - if (_s.ok()) { \ - SUCCEED(); \ - } else { \ - FAIL() << "Bad status: " << _s.GetDetail(); \ - } \ - } while (0); - -// Like the above, but doesn't record successful tests. -#define ASSERT_OK_FAST(status) do { \ - Status _s = status; \ - if (!_s.ok()) { \ - FAIL() << "Bad status: " << _s.GetDetail(); \ - } \ - } while (0); - -#endif
