Use getError and remove the error_code operator.
[oota-llvm.git] / unittests / Support / ErrorOrTest.cpp
index 4c5eed050f926b2a71ff242c78227d27e01b0e01..98174e8cd702c34bd5052db41b94240f0bf2177c 100644 (file)
@@ -25,7 +25,7 @@ TEST(ErrorOr, SimpleValue) {
 
   a = t2();
   EXPECT_FALSE(a);
-  EXPECT_EQ(errc::invalid_argument, a);
+  EXPECT_EQ(errc::invalid_argument, a.getError());
 #ifdef EXPECT_DEBUG_DEATH
   EXPECT_DEBUG_DEATH(*a, "Cannot get value when an error exists");
 #endif