MCPcopy Create free account
hub / github.com/Thalhammer/jwt-cpp / run_multitest

Function run_multitest

tests/OpenSSLErrorTest.cpp:712–725  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

710
711template<typename Func>
712void run_multitest(const std::vector<multitest_entry>& mapping, Func fn) {
713 for (auto& e : mapping) {
714 std::error_code ec;
715 *e.fail_mask_ptr = e.fail_bitmask;
716 try {
717 fn(ec);
718 } catch (...) {
719 *e.fail_mask_ptr = 0;
720 throw;
721 }
722 *e.fail_mask_ptr = 0;
723 ASSERT_EQ(ec, e.expected_ec);
724 }
725}
726
727TEST(OpenSSLErrorTest, ExtractPubkeyFromCert) {
728 std::vector<multitest_entry> mapping{{&fail_BIO_new, 1, jwt::error::rsa_error::create_mem_bio_failed},

Callers 2

TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected