summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2020-02-26 09:02:08 -0800
committer Steven Moreland <smoreland@google.com> 2020-02-26 09:14:29 -0800
commit4351d265755b255ff60b678410c5b64e35164d62 (patch)
tree86a8a4d7a754342510f5ad941e430ea2f9d3dc3e
parenta7fdceeba2139f2b0824af8ca5d10d55b6ced398 (diff)
Use String8 ostream from String8.h
Bug: N/A Test: N/A Change-Id: If2762ec4a9bb84cca41b1752fe005605eb9b2013
-rw-r--r--libs/androidfw/tests/CommonHelpers.h6
-rw-r--r--tools/aapt/tests/AaptConfig_test.cpp3
-rw-r--r--tools/aapt/tests/AaptGroupEntry_test.cpp1
-rw-r--r--tools/aapt/tests/ResourceTable_test.cpp1
-rw-r--r--tools/aapt/tests/TestHelper.h33
5 files changed, 1 insertions, 43 deletions
diff --git a/libs/androidfw/tests/CommonHelpers.h b/libs/androidfw/tests/CommonHelpers.h
index 8af13f20fb0d..316a57aa1ae9 100644
--- a/libs/androidfw/tests/CommonHelpers.h
+++ b/libs/androidfw/tests/CommonHelpers.h
@@ -21,8 +21,6 @@
#include <string>
#include "androidfw/ResourceTypes.h"
-#include "utils/String16.h"
-#include "utils/String8.h"
namespace android {
@@ -40,10 +38,6 @@ static inline bool operator==(const ResTable_config& a, const ResTable_config& b
return a.compare(b) == 0;
}
-static inline ::std::ostream& operator<<(::std::ostream& out, const String8& str) {
- return out << str.string();
-}
-
static inline ::std::ostream& operator<<(::std::ostream& out, const ResTable_config& c) {
return out << c.toString();
}
diff --git a/tools/aapt/tests/AaptConfig_test.cpp b/tools/aapt/tests/AaptConfig_test.cpp
index 4f22fa581a88..b7c6bd25a565 100644
--- a/tools/aapt/tests/AaptConfig_test.cpp
+++ b/tools/aapt/tests/AaptConfig_test.cpp
@@ -20,7 +20,6 @@
#include "AaptConfig.h"
#include "ConfigDescription.h"
#include "SdkConstants.h"
-#include "TestHelper.h"
using android::String8;
@@ -127,4 +126,4 @@ TEST(AaptConfigTest, HdrQualifier) {
config.colorMode & android::ResTable_config::MASK_HDR);
EXPECT_EQ(SDK_O, config.sdkVersion);
EXPECT_EQ(String8("lowdr-v26"), config.toString());
-} \ No newline at end of file
+}
diff --git a/tools/aapt/tests/AaptGroupEntry_test.cpp b/tools/aapt/tests/AaptGroupEntry_test.cpp
index 7348a08a022f..bf5ca59a81c8 100644
--- a/tools/aapt/tests/AaptGroupEntry_test.cpp
+++ b/tools/aapt/tests/AaptGroupEntry_test.cpp
@@ -19,7 +19,6 @@
#include "AaptAssets.h"
#include "ResourceFilter.h"
-#include "TestHelper.h"
using android::String8;
diff --git a/tools/aapt/tests/ResourceTable_test.cpp b/tools/aapt/tests/ResourceTable_test.cpp
index f2c696b2f87e..0d550df16767 100644
--- a/tools/aapt/tests/ResourceTable_test.cpp
+++ b/tools/aapt/tests/ResourceTable_test.cpp
@@ -19,7 +19,6 @@
#include "ConfigDescription.h"
#include "ResourceTable.h"
-#include "TestHelper.h"
using android::String16;
diff --git a/tools/aapt/tests/TestHelper.h b/tools/aapt/tests/TestHelper.h
deleted file mode 100644
index 79174832a54d..000000000000
--- a/tools/aapt/tests/TestHelper.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2014 The Android Open Source Project
- *
- * Licensed 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 __TEST_HELPER_H
-#define __TEST_HELPER_H
-
-#include <utils/String8.h>
-
-namespace android {
-
-/**
- * Stream operator for nicely printing String8's in gtest output.
- */
-inline std::ostream& operator<<(std::ostream& stream, const String8& str) {
- return stream << str.string();
-}
-
-}
-
-#endif