Commit 0effaa94 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

cut log lines in uncaught_exceptions test

Summary: Cut log lines in `folly::uncaught_exceptions` test cases. Having log lines is helpful when debugging test failures but we can always add them in when necessary. This makes running the test binary directly less noisy, and running test binaries directly is an important case not to be overlooked.

Reviewed By: markisaa

Differential Revision: D26504200

fbshipit-source-id: 00e06e1396b9ccc9cdd739ace1007726ebaa3d88
parent 646b9998
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
#include <folly/lang/UncaughtExceptions.h> #include <folly/lang/UncaughtExceptions.h>
#include <glog/logging.h>
#include <folly/Conv.h> #include <folly/Conv.h>
#include <folly/portability/GTest.h> #include <folly/portability/GTest.h>
...@@ -36,8 +34,6 @@ class Validator { ...@@ -36,8 +34,6 @@ class Validator {
// Invoke to validate explicitly. // Invoke to validate explicitly.
void validate() { void validate() {
LOG(INFO) << msg_ << ", expected " << expectedCount_ << ", is "
<< folly::uncaught_exceptions();
EXPECT_EQ(expectedCount_, folly::uncaught_exceptions()) << msg_; EXPECT_EQ(expectedCount_, folly::uncaught_exceptions()) << msg_;
} }
...@@ -112,11 +108,8 @@ struct ThrowInDestructor { ...@@ -112,11 +108,8 @@ struct ThrowInDestructor {
(void)stackObjectThrowingOnUnwind; (void)stackObjectThrowingOnUnwind;
Validator validator( Validator validator(
N - I + 1, "validating in " + folly::to<std::string>(I)); N - I + 1, "validating in " + folly::to<std::string>(I));
LOG(INFO) << "throwing in ~ThrowInDestructor " << I;
throw std::logic_error("inner"); throw std::logic_error("inner");
} catch (const std::logic_error&) { } catch (const std::logic_error&) {
LOG(INFO) << "catching in ~ThrowInDestructor " << I << " expecting "
<< N - I << ", it is " << folly::uncaught_exceptions();
EXPECT_EQ(N - I, folly::uncaught_exceptions()); EXPECT_EQ(N - I, folly::uncaught_exceptions());
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment