Include test sources to pick up functions and classes from the module rather than from the non-modular library which is baked into the test-main library. (#2356)

This averts linker problems:
 - strong ownership model: missing linker symbols
 - weak ownership model: duplicate linker symbols

Simplify `gtest-extra.cc` while at it.
This commit is contained in:
Daniela Engert
2021-07-03 07:21:54 -07:00
committed by GitHub
parent 02ad5e11da
commit f2b03facd9
3 changed files with 19 additions and 8 deletions
+3 -4
View File
@@ -32,11 +32,10 @@ output_redirect::~output_redirect() FMT_NOEXCEPT {
}
void output_redirect::flush() {
# if EOF != -1
# error "FMT_RETRY assumes return value of -1 indicating failure"
# endif
int result = 0;
FMT_RETRY(result, fflush(file_));
do {
result = fflush(file_);
} while (result == EOF && errno == EINTR);
if (result != 0) throw fmt::system_error(errno, "cannot flush stream");
}