MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / BOOST_AUTO_TEST_CASE

Function BOOST_AUTO_TEST_CASE

src/test/util_threadnames_tests.cpp:53–64  ·  view source on GitHub ↗

* Rename a bunch of threads with the same basename (expect_multiple=true), ensuring suffixes are * applied properly. */

Source from the content-addressed store, hash-verified

51 * applied properly.
52 */
53BOOST_AUTO_TEST_CASE(util_threadnames_test_rename_threaded)
54{
55 std::set<std::string> names = RenameEnMasse(100);
56
57 BOOST_CHECK_EQUAL(names.size(), 100U);
58
59 // Names "test_thrd.[n]" should exist for n = [0, 99]
60 for (int i = 0; i < 100; ++i) {
61 BOOST_CHECK(names.contains(TEST_THREAD_NAME_BASE + ToString(i)));
62 }
63
64}
65
66BOOST_AUTO_TEST_SUITE_END()

Callers

nothing calls this directly

Calls 4

RenameEnMasseFunction · 0.85
ToStringFunction · 0.50
sizeMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected