Unbreak unit tests.
authorDaniel Dunbar <daniel@zuster.org>
Mon, 24 Aug 2009 02:02:58 +0000 (02:02 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Mon, 24 Aug 2009 02:02:58 +0000 (02:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79879 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/ADT/APIntTest.cpp
unittests/Support/ConstantRangeTest.cpp

index a89a960a07848748da99b77669e4d802b8c62f63..3fd4fd4c3099b4b8f9b163988022b6f9d9196231 100644 (file)
@@ -17,6 +17,13 @@ using namespace llvm;
 
 namespace {
 
+// Support APInt output to an std::ostream.
+inline std::ostream &operator<<(std::ostream &OS, const APInt &Value) {
+  raw_os_ostream RawOS(OS);
+  RawOS << Value;
+  return OS;
+}
+
 // Test that APInt shift left works when bitwidth > 64 and shiftamt == 0
 TEST(APIntTest, ShiftLeftByZero) {
   APInt One = APInt::getNullValue(65) + 1;
index f377b6f068af51d580247037941139ba2081e180..56f315a09af3e9ddf03cb6ce67710f3e6f76a5f1 100644 (file)
@@ -16,6 +16,13 @@ using namespace llvm;
 
 namespace {
 
+// Support APInt output to an std::ostream.
+inline std::ostream &operator<<(std::ostream &OS, const APInt &Value) {
+  raw_os_ostream RawOS(OS);
+  RawOS << Value;
+  return OS;
+}
+
 class ConstantRangeTest : public ::testing::Test {
 protected:
   static ConstantRange Full;