test: Use throwing variant accessor

test: Use throwing variant accessor

It does not matter if the tests fail due to a BOOST_CHECK failure or
due to a thrown exception. Prefer the exception because it is less
code.

Example fail with the throwing accessor:

unknown location(0): fatal error: in "script_standard_tests/script_standard_ExtractDestinations": std::bad_variant_access: std::get: wrong index for variant
test/script_standard_tests.cpp(314): last checkpoint

*** 1 failure is detected in the test module "Bitcoin Core Test Suite"

情報元 - test: Use throwing variant accessor · bitcoin/[email protected] · GitHub

test: Use throwing variant accessor · bitcoin/bitcoin@000098f · GitHub
スポンサーリンク

シェアする

フォローする

スポンサーリンク

トップへ戻る