Definition at line 13 of file message_tag.C.
◆ CPPUNIT_TEST() [1/2]
◆ CPPUNIT_TEST() [2/2]
◆ CPPUNIT_TEST_SUITE_END()
| MessageTagTest::CPPUNIT_TEST_SUITE_END |
( |
| ) |
|
◆ LIBMESH_CPPUNIT_TEST_SUITE()
◆ setUp()
| void MessageTagTest::setUp |
( |
| ) |
|
|
inline |
◆ tearDown()
| void MessageTagTest::tearDown |
( |
| ) |
|
|
inline |
◆ testGetUniqueTagAuto()
| void MessageTagTest::testGetUniqueTagAuto |
( |
| ) |
|
|
inline |
Definition at line 34 of file message_tag.C.
35 {
36 LOG_UNIT_TEST;
37
38
39
40
42
44
45 const int n_vals = 5;
46 const int n_vals_in_scope = 3;
47 std::vector<int> vals(n_vals);
48
49 {
50 std::vector<Parallel::MessageTag> tags(n_vals_in_scope);
51 for (int i=0; i != n_vals_in_scope; ++i)
52 {
54 vals[i] = tags[i].
value();
55 for (int j=0; j != i; ++j)
56 {
57 CPPUNIT_ASSERT(vals[i] != vals[j]);
58 }
59 }
60 }
61
62
63 for (int i=n_vals_in_scope; i != n_vals; ++i)
64 {
66 vals[i] = another_tag.
value();
67 for (int j=0; j != i; ++j)
68 {
69 CPPUNIT_ASSERT(vals[i] != vals[j]);
70 }
71 }
72 }
MessageTag get_unique_tag(int tagvalue=MessageTag::invalid_tag) const
void duplicate(const Communicator &comm)
References libMesh::Parallel::Communicator::duplicate(), libMesh::Parallel::Communicator::get_unique_tag(), TestCommWorld, and TIMPI::MessageTag::value().
◆ testGetUniqueTagManual()
| void MessageTagTest::testGetUniqueTagManual |
( |
| ) |
|
|
inline |
Definition at line 76 of file message_tag.C.
77 {
78 LOG_UNIT_TEST;
79
80
81
82
83
84 const int requests[] = {2, 4, 6, 8, 8, 6, 8, 123, 3141, 3142};
85
86 for (const int i : requests)
87 {
88 Parallel::MessageTag manual_tag =
90 CPPUNIT_ASSERT_EQUAL(i, manual_tag.value());
91 }
92 }
Communicator * TestCommWorld
References TestCommWorld, and TIMPI::MessageTag::value().
◆ _number
| std::vector<std::string> MessageTagTest::_number |
|
private |
The documentation for this class was generated from the following file: