| 9 | #include <stdexcept> |
| 10 | |
| 11 | int main() { |
| 12 | using namespace boost::ut; |
| 13 | |
| 14 | "exceptions"_test = [] { |
| 15 | expect(throws<std::runtime_error>([] { |
| 16 | throw std::runtime_error{"exception!"}; |
| 17 | })) << "throws runtime_error"; |
| 18 | expect(throws([] { throw 0; })) << "throws any exception"; |
| 19 | expect(nothrow([] {})) << "doesn't throw"; |
| 20 | }; |
| 21 | } |