[llvm-commits] [llvm] r79879 - in /llvm/trunk/unittests: ADT/APIntTest.cpp Support/ConstantRangeTest.cpp
Daniel Dunbar
daniel at zuster.org
Sun Aug 23 19:02:58 PDT 2009
Author: ddunbar
Date: Sun Aug 23 21:02:58 2009
New Revision: 79879
URL: http://llvm.org/viewvc/llvm-project?rev=79879&view=rev
Log:
Unbreak unit tests.
Modified:
llvm/trunk/unittests/ADT/APIntTest.cpp
llvm/trunk/unittests/Support/ConstantRangeTest.cpp
Modified: llvm/trunk/unittests/ADT/APIntTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/APIntTest.cpp?rev=79879&r1=79878&r2=79879&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/APIntTest.cpp (original)
+++ llvm/trunk/unittests/ADT/APIntTest.cpp Sun Aug 23 21:02:58 2009
@@ -17,6 +17,13 @@
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;
Modified: llvm/trunk/unittests/Support/ConstantRangeTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/ConstantRangeTest.cpp?rev=79879&r1=79878&r2=79879&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/ConstantRangeTest.cpp (original)
+++ llvm/trunk/unittests/Support/ConstantRangeTest.cpp Sun Aug 23 21:02:58 2009
@@ -16,6 +16,13 @@
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;
More information about the llvm-commits
mailing list