From: Peter Griess Date: Thu, 26 Sep 2013 13:55:12 +0000 (-0500) Subject: Explicitly use !basic_istream::fail() in test. X-Git-Tag: v0.22.0~837 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=209fa4a88193af19c1f4446767b2dd6086e789b0;p=folly.git Explicitly use !basic_istream::fail() in test. Summary: - Looks like libc++ doesn't support operator bool() for streams? Use !fail() explicitly to work around this. Test Plan: - fbconfig -r folly && fbmake runtests - ./configure && make check on Ubuntu/FC/Mac Reviewed By: andrei.alexandrescu@fb.com FB internal diff: D998596 --- diff --git a/folly/test/FBStringTest.cpp b/folly/test/FBStringTest.cpp index 36c8fe55..ddc8a646 100644 --- a/folly/test/FBStringTest.cpp +++ b/folly/test/FBStringTest.cpp @@ -1029,7 +1029,7 @@ sed nisl. In diam lacus, lobortis ut posuere nec, ornare id quam."; ifstream input(f); fbstring line; FOR_EACH (i, v) { - EXPECT_TRUE(getline(input, line)); + EXPECT_TRUE(!getline(input, line).fail()); EXPECT_EQ(line, *i); } }