Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update expensify_prod branch #1681

Merged
merged 3 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions test/lib/tpunit++.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,9 @@ void tpunit::TestFixture::tpunit_detail_do_method(tpunit::TestFixture::method* m
} catch(const std::exception& e) {
lock_guard<recursive_mutex> lock(*(m->_this->_mutex));
tpunit_detail_exception(m->_this, m, e.what());
} catch(const char* e) {
lock_guard<recursive_mutex> lock(*(m->_this->_mutex));
tpunit_detail_exception(m->_this, m, e);
} catch(ShutdownException se) {
// Just re-throw, this exception is special and indicates that a test wants its thread to quit.
throw;
Expand Down
4 changes: 2 additions & 2 deletions test/lib/tpunit++.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ using namespace std;
*/
#define ASSERT_THROW(statement, exception) try { statement; ABORT(); } catch(const exception&) { PASS(); } catch(...) { ABORT(); }
#define EXPECT_THROW(statement, exception) try { statement; FAIL(); } catch(const exception&) { PASS(); } catch(...) { FAIL(); }
#define ASSERT_NO_THROW(statement) try { statement; PASS(); } catch(...) { ABORT(); }
#define EXPECT_NO_THROW(statement) try { statement; PASS(); } catch(...) { FAIL(); }
#define ASSERT_NO_THROW(statement) try { statement; PASS(); } catch(const exception& e) { cout << "Something threw: " << e.what() << endl; ABORT(); } catch(const char* e) { cout << "Something threw: " << e << endl; ABORT(); } catch(...) { cout << "Something threw, unsure what..." << endl; ABORT(); }
#define EXPECT_NO_THROW(statement) try { statement; PASS(); } catch(const exception& e) { cout << "Something threw: " << e.what() << endl; FAIL(); } catch(const char* e) { cout << "Something threw: " << e << endl; FAIL(); } catch(...) { cout << "Something threw, unsure what..." << endl; FAIL(); }
#define ASSERT_ANY_THROW(statement) try { statement; ABORT(); } catch(...) { PASS(); }
#define EXPECT_ANY_THROW(statement) try { statement; FAIL(); } catch(...) { PASS(); }

Expand Down