[llvm] [NFC][ADT] Introduce a test harness for StringRefTest (PR #105500)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 21 09:53:52 PDT 2024
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/105500
>From be44a0262a9db15100736b79561a774ddb380f93 Mon Sep 17 00:00:00 2001
From: Rahul Joshi <rjoshi at nvidia.com>
Date: Wed, 21 Aug 2024 09:51:46 -0700
Subject: [PATCH] [NFC][ADT] Remove << operators from StringTest
- Remove ostream << operators for StringRef and StringRef pair
from StringTest. Both of these are natively supported by
googletest framework
---
llvm/unittests/ADT/StringRefTest.cpp | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/llvm/unittests/ADT/StringRefTest.cpp b/llvm/unittests/ADT/StringRefTest.cpp
index b3c206a336962d..c086ecaed45c46 100644
--- a/llvm/unittests/ADT/StringRefTest.cpp
+++ b/llvm/unittests/ADT/StringRefTest.cpp
@@ -16,21 +16,6 @@
#include "gtest/gtest.h"
using namespace llvm;
-namespace llvm {
-
-std::ostream &operator<<(std::ostream &OS, const StringRef &S) {
- OS << S.str();
- return OS;
-}
-
-std::ostream &operator<<(std::ostream &OS,
- const std::pair<StringRef, StringRef> &P) {
- OS << "(" << P.first << ", " << P.second << ")";
- return OS;
-}
-
-}
-
// Check that we can't accidentally assign a temporary std::string to a
// StringRef. (Unfortunately we can't make use of the same thing with
// constructors.)
More information about the llvm-commits
mailing list