MCPcopy Create free account
hub / github.com/Derious/cuMPC / check_stdlist_transform

Function check_stdlist_transform

dependence/eigen-3.4.0/test/stdlist.cpp:46–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44
45template<typename TransformType>
46void check_stdlist_transform(const TransformType&)
47{
48 typedef typename TransformType::MatrixType MatrixType;
49 TransformType x(MatrixType::Random()), y(MatrixType::Random()), ti=TransformType::Identity();
50 std::list<TransformType,Eigen::aligned_allocator<TransformType> > v(10,ti), w(20, y);
51 v.front() = x;
52 w.front() = w.back();
53 VERIFY_IS_APPROX(w.front(), w.back());
54 v = w;
55
56 typename std::list<TransformType,Eigen::aligned_allocator<TransformType> >::iterator vi = v.begin();
57 typename std::list<TransformType,Eigen::aligned_allocator<TransformType> >::iterator wi = w.begin();
58 for(int i = 0; i < 20; i++)
59 {
60 VERIFY_IS_APPROX(*vi, *wi);
61 ++vi;
62 ++wi;
63 }
64
65 v.resize(21, ti);
66 v.back() = x;
67 VERIFY_IS_APPROX(v.back(), x);
68 v.resize(22,y);
69 VERIFY_IS_APPROX(v.back(), y);
70 v.push_back(x);
71 VERIFY_IS_APPROX(v.back(), x);
72}
73
74template<typename QuaternionType>
75void check_stdlist_quaternion(const QuaternionType&)

Callers 1

EIGEN_DECLARE_TESTFunction · 0.70

Calls 3

beginMethod · 0.45
resizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected