ZEDCam unit tests.
More...
ZEDCam unit tests.
- Author
- clayjay3 (clayt.nosp@m.onra.nosp@m.ycowe.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
- Date
- 2025-01-05
- Copyright
- Copyright Mars Rover Design Team 2025 - All Rights Reserved
◆ TEST_F() [1/4]
Test the functionality of the ZEDCam constructor and destructor.
- Author
- clayjay3 (clayt.nosp@m.onra.nosp@m.ycowe.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
- Date
- 2025-01-05
73{
74
75 ZEDCam zedCam(1280, 720, 30, 90.0, 60.0,
false, 0.5f, 20.0f,
false,
false,
false, 1, 0);
76
77
78 EXPECT_FALSE(zedCam.GetCameraIsOpen());
79
80
81}
This class implements and interfaces with the most common ZEDSDK cameras and features....
Definition ZEDCam.h:31
◆ TEST_F() [2/4]
Check that ZEDCam doesn't leak any memory.
- Author
- clayjay3 (clayt.nosp@m.onra.nosp@m.ycowe.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
- Date
- 2025-01-05
91{
92
93 ZEDCam* pZEDCam =
new ZEDCam(1280, 720, 30, 90.0, 60.0,
false, 0.5f, 20.0f,
false,
false,
false, 1, 0);
94
95 delete pZEDCam;
96
97 pZEDCam = nullptr;
98}
◆ TEST_F() [3/4]
This should fail when the –check_for_leaks command line flag is specified.
- Author
- clayjay3 (clayt.nosp@m.onra.nosp@m.ycowe.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
- Date
- 2025-01-05
108{
109
110 ZEDCam* pZEDCam =
new ZEDCam(1280, 720, 30, 90.0, 60.0,
false, 0.5f, 20.0f,
false,
false,
false, 1, 0);
111 EXPECT_TRUE(pZEDCam != nullptr);
112}
◆ TEST_F() [4/4]
Test the GetCameraIsOpen method.
- Author
- clayjay3 (clayt.nosp@m.onra.nosp@m.ycowe.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
- Date
- 2025-01-05
122{
123
124 ZEDCam zedCam(1280, 720, 30, 90.0, 60.0,
false, 0.5f, 20.0f,
false,
false,
false, 1, 0);
125
126
127 EXPECT_FALSE(zedCam.GetCameraIsOpen());
128}