50{
51 double buf1[] = {1, 4, 2, 5, 3, 6};
52
55
58
59 BOOST_CHECK_EQUAL(1, *m1_iter);
60 BOOST_CHECK_EQUAL(1, *m2_iter);
61 BOOST_CHECK_EQUAL(1, *m1_iter++);
62 BOOST_CHECK_EQUAL(1, *m2_iter++);
63 BOOST_CHECK_EQUAL(4, *m1_iter++);
64 BOOST_CHECK_EQUAL(4, *m2_iter++);
65 BOOST_CHECK_EQUAL(2, *m1_iter++);
66 BOOST_CHECK_EQUAL(2, *m2_iter++);
67 BOOST_CHECK_EQUAL(5, *m1_iter++);
68 BOOST_CHECK_EQUAL(5, *m2_iter++);
69 BOOST_CHECK_EQUAL(3, *m1_iter++);
70 BOOST_CHECK_EQUAL(3, *m2_iter++);
71 BOOST_CHECK_EQUAL(6, *m1_iter++);
72 BOOST_CHECK_EQUAL(6, *m2_iter++);
73 BOOST_CHECK(m1_iter == m1.end());
74 BOOST_CHECK(m2_iter == m2.end());
75
76 m1.Transpose();
77 m1_iter = m1.begin();
78 m2_iter = m2.begin();
79
80 BOOST_CHECK_EQUAL(1, *m1_iter);
81 BOOST_CHECK_EQUAL(1, *m2_iter);
82 BOOST_CHECK_EQUAL(2, *(++m1_iter));
83 BOOST_CHECK_EQUAL(2, *(++m2_iter));
84 BOOST_CHECK_EQUAL(3, *(++m1_iter));
85 BOOST_CHECK_EQUAL(3, *(++m2_iter));
86 BOOST_CHECK_EQUAL(4, *(++m1_iter));
87 BOOST_CHECK_EQUAL(4, *(++m2_iter));
88 BOOST_CHECK_EQUAL(5, *(++m1_iter));
89 BOOST_CHECK_EQUAL(5, *(++m2_iter));
90 BOOST_CHECK_EQUAL(6, *(++m1_iter));
91 BOOST_CHECK_EQUAL(6, *(++m2_iter));
92 BOOST_CHECK(m1_iter != m1.end());
93 BOOST_CHECK(m2_iter != m2.end());
94 ++m1_iter;
95 ++m2_iter;
96 BOOST_CHECK(m1_iter == m1.end());
97 BOOST_CHECK(m2_iter == m2.end());
98}