Skip to content

Commit eba70c0

Browse files
Add coverage marker to exclude OpenGL dependent code
1 parent 7f0f449 commit eba70c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+100
-0
lines changed

g2o/types/data/robot_laser.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ bool RobotLaser::write(std::ostream& os) const {
115115
void RobotLaser::setOdomPose(const SE2& odomPose) { odomPose_ = odomPose; }
116116

117117
#ifdef G2O_HAVE_OPENGL
118+
// LCOV_EXCL_START
118119
RobotLaserDrawAction::RobotLaserDrawAction()
119120
: DrawAction(typeid(RobotLaser).name()),
120121
beamsDownsampling_(nullptr),
@@ -182,6 +183,7 @@ bool RobotLaserDrawAction::operator()(
182183

183184
return true;
184185
}
186+
// LCOV_EXCL_STOP
185187
#endif
186188

187189
} // namespace g2o

g2o/types/data/robot_laser.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class G2O_TYPES_DATA_API RobotLaser : public RawLaser {
6767
};
6868

6969
#ifdef G2O_HAVE_OPENGL
70+
// LCOV_EXCL_START
7071
class G2O_TYPES_DATA_API RobotLaserDrawAction : public DrawAction {
7172
public:
7273
RobotLaserDrawAction();
@@ -80,6 +81,7 @@ class G2O_TYPES_DATA_API RobotLaserDrawAction : public DrawAction {
8081
std::shared_ptr<FloatProperty> pointSize_;
8182
std::shared_ptr<FloatProperty> maxRange_;
8283
};
84+
// LCOV_EXCL_STOP
8385
#endif
8486

8587
} // namespace g2o

g2o/types/data/types_data.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@ G2O_REGISTER_TYPE_NAME("ROBOTLASER1", RobotLaser);
4242
G2O_REGISTER_TYPE_NAME("VERTEX_ELLIPSE", VertexEllipse);
4343

4444
#ifdef G2O_HAVE_OPENGL
45+
// LCOV_EXCL_START
4546
G2O_REGISTER_ACTION(RobotLaserDrawAction);
4647
G2O_REGISTER_ACTION(VertexTagDrawAction);
4748
G2O_REGISTER_ACTION(VertexEllipseDrawAction);
49+
// LCOV_EXCL_STOP
4850
#endif
4951

5052
} // namespace g2o

g2o/types/data/vertex_ellipse.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ bool VertexEllipse::write(std::ostream& os) const {
100100
}
101101

102102
#ifdef G2O_HAVE_OPENGL
103+
// LCOV_EXCL_START
103104
VertexEllipseDrawAction::VertexEllipseDrawAction()
104105
: DrawAction(typeid(VertexEllipse).name()) {}
105106

@@ -163,6 +164,7 @@ bool VertexEllipseDrawAction::operator()(
163164
glPopMatrix();
164165
return true;
165166
}
167+
// LCOV_EXCL_STOP
166168
#endif
167169

168170
} // namespace g2o

g2o/types/data/vertex_ellipse.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ class G2O_TYPES_DATA_API VertexEllipse : public RobotData {
8383
};
8484

8585
#ifdef G2O_HAVE_OPENGL
86+
// LCOV_EXCL_START
8687
class G2O_TYPES_DATA_API VertexEllipseDrawAction : public DrawAction {
8788
public:
8889
VertexEllipseDrawAction();
@@ -94,6 +95,7 @@ class G2O_TYPES_DATA_API VertexEllipseDrawAction : public DrawAction {
9495
HyperGraphElementAction::Parameters& params_) override;
9596
std::shared_ptr<DoubleProperty> scaleFactor_ = nullptr;
9697
};
98+
// LCOV_EXCL_STOP
9799
#endif
98100

99101
} // namespace g2o

g2o/types/data/vertex_tag.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ bool VertexTag::write(std::ostream& os) const {
6262
}
6363

6464
#ifdef G2O_HAVE_OPENGL
65+
// LCOV_EXCL_START
6566
VertexTagDrawAction::VertexTagDrawAction()
6667
: DrawAction(typeid(VertexTag).name()), textSize_(nullptr) {}
6768

@@ -100,6 +101,7 @@ bool VertexTagDrawAction::operator()(
100101
glPopMatrix();
101102
return true;
102103
}
104+
// LCOV_EXCL_STOP
103105
#endif
104106

105107
} // namespace g2o

g2o/types/data/vertex_tag.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class G2O_TYPES_DATA_API VertexTag : public RobotData {
6565
};
6666

6767
#ifdef G2O_HAVE_OPENGL
68+
// LCOV_EXCL_START
6869
class G2O_TYPES_DATA_API VertexTagDrawAction : public DrawAction {
6970
public:
7071
VertexTagDrawAction();
@@ -76,6 +77,7 @@ class G2O_TYPES_DATA_API VertexTagDrawAction : public DrawAction {
7677
HyperGraphElementAction::Parameters&) override;
7778
std::shared_ptr<DoubleProperty> textSize_;
7879
};
80+
// LCOV_EXCL_STOP
7981
#endif
8082

8183
} // namespace g2o

g2o/types/sclam2d/edge_se2_odom_differential_calib.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ void EdgeSE2OdomDifferentialCalib::computeError() {
5757
}
5858

5959
#ifdef G2O_HAVE_OPENGL
60+
// LCOV_EXCL_START
6061
EdgeSE2OdomDifferentialCalibDrawAction::EdgeSE2OdomDifferentialCalibDrawAction()
6162
: DrawAction(typeid(EdgeSE2OdomDifferentialCalib).name()) {}
6263

@@ -80,6 +81,7 @@ bool EdgeSE2OdomDifferentialCalibDrawAction::operator()(
8081
glPopAttrib();
8182
return true;
8283
}
84+
// LCOV_EXCL_STOP
8385
#endif
8486

8587
} // namespace g2o

g2o/types/sclam2d/edge_se2_odom_differential_calib.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@ class G2O_TYPES_SCLAM2D_API EdgeSE2OdomDifferentialCalib
4646
};
4747

4848
#ifdef G2O_HAVE_OPENGL
49+
// LCOV_EXCL_START
4950
class G2O_TYPES_SCLAM2D_API EdgeSE2OdomDifferentialCalibDrawAction
5051
: public DrawAction {
5152
public:
5253
EdgeSE2OdomDifferentialCalibDrawAction();
5354
bool operator()(HyperGraph::HyperGraphElement& element,
5455
HyperGraphElementAction::Parameters& params_) override;
5556
};
57+
// LCOV_EXCL_STOP
5658
#endif
5759

5860
} // namespace g2o

g2o/types/sclam2d/edge_se2_sensor_calib.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ void EdgeSE2SensorCalib::initialEstimate(
7878
}
7979

8080
#ifdef G2O_HAVE_OPENGL
81+
// LCOV_EXCL_START
8182
EdgeSE2SensorCalibDrawAction::EdgeSE2SensorCalibDrawAction()
8283
: DrawAction(typeid(EdgeSE2SensorCalib).name()) {}
8384

@@ -101,6 +102,7 @@ bool EdgeSE2SensorCalibDrawAction::operator()(
101102
glPopAttrib();
102103
return true;
103104
}
105+
// LCOV_EXCL_STOP
104106
#endif
105107

106108
} // namespace g2o

0 commit comments

Comments
 (0)