@@ -29,7 +29,11 @@ public:
29
29
CPPUNIT_ASSERT (!default_corner .at_corner ());
30
30
CPPUNIT_ASSERT (!default_corner .at_vertex ());
31
31
CPPUNIT_ASSERT (!default_corner .at_edge ());
32
- CPPUNIT_ASSERT_EQUAL ((std ::string )"not at corner" , default_corner .print ());
32
+ const std ::string default_corner_string = "not at corner" ;
33
+ std ::stringstream default_corner_ss ;
34
+ default_corner_ss << default_corner ;
35
+ CPPUNIT_ASSERT_EQUAL (default_corner_string , default_corner .print ());
36
+ CPPUNIT_ASSERT_EQUAL (default_corner_string , default_corner_ss .str ());
33
37
34
38
// EDGE elem for vertex testing
35
39
Mesh mesh_1d (* TestCommWorld );
@@ -50,6 +54,11 @@ public:
50
54
CPPUNIT_ASSERT_EQUAL (at_edge_vertex .at_vertex (v ), v == 1 );
51
55
CPPUNIT_ASSERT_EQUAL (at_edge_vertex .is_valid (* edge , edge -> point (v )), v == 1 );
52
56
}
57
+ const std ::string at_vertex_string = "at vertex 1" ;
58
+ std ::stringstream at_vertex_ss ;
59
+ at_vertex_ss << at_edge_vertex ;
60
+ CPPUNIT_ASSERT_EQUAL (at_vertex_string , at_edge_vertex .print ());
61
+ CPPUNIT_ASSERT_EQUAL (at_vertex_string , at_vertex_ss .str ());
53
62
54
63
#if LIBMESH_DIM > 1
55
64
// QUAD elem for vertex testing
@@ -99,6 +108,11 @@ public:
99
108
((quad_edge_elem -> point (0 ).absolute_fuzzy_equals (quad -> point (2 ))
100
109
&& quad_edge_elem -> point (1 ).absolute_fuzzy_equals (quad -> point (1 )))));
101
110
}
111
+ const std ::string at_edge_string = "at edge with vertices 1 and 2" ;
112
+ std ::stringstream at_edge_ss ;
113
+ at_edge_ss << at_quad_edge ;
114
+ CPPUNIT_ASSERT_EQUAL (at_edge_string , at_quad_edge .print ());
115
+ CPPUNIT_ASSERT_EQUAL (at_edge_string , at_edge_ss .str ());
102
116
#endif
103
117
104
118
#if LIBMESH_DIM > 2
0 commit comments