Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
WebRTC.cc File Reference

WebRTC unit tests. More...

#include "../../../../../../src/vision/cameras/sim/WebRTC.h"
#include "../../../../../TestingBase.hh"
Include dependency graph for WebRTC.cc:

Classes

class  WebRTCTests
 Unit Test Class for the WebRTC. More...

Functions

 TEST_F (WebRTCTests, ConstructorDestructor)
 Test the functionality of the WebRTC constructor and destructor.
 TEST_F (WebRTCTests, DoesNotLeak)
 Check that WebRTC doesn't leak any memory.
 TEST_F (WebRTCTests, Leaks)
 This should fail when the –check_for_leaks command line flag is specified.

Detailed Description

WebRTC 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

Function Documentation

◆ TEST_F() [1/3]

TEST_F ( WebRTCTests ,
ConstructorDestructor  )

Test the functionality of the WebRTC 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
81{
82 // Create a WebRTC object.
83 WebRTC webrtc("ws://localhost:8080", "streamer1");
84
85 // Check initial connection status.
86 EXPECT_FALSE(webrtc.GetIsConnected());
87
88 // Destructor will be called automatically when the object goes out of scope.
89}
This class is used to establish a connection with the RoveSoSimulator and retrieve video streams from...
Definition WebRTC.h:44
Here is the call graph for this function:

◆ TEST_F() [2/3]

TEST_F ( WebRTCTests ,
DoesNotLeak  )

Check that WebRTC 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
99{
100 // Create a new WebRTC object.
101 WebRTC* pWebRTC = new WebRTC("ws://localhost:8080", "streamer1");
102 // Delete object.
103 delete pWebRTC;
104 // Point to null.
105 pWebRTC = nullptr;
106}

◆ TEST_F() [3/3]

TEST_F ( WebRTCTests ,
Leaks  )

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
116{
117 // Create a new WebRTC object.
118 WebRTC* pWebRTC = new WebRTC("ws://localhost:8080", "streamer1");
119 EXPECT_TRUE(pWebRTC != nullptr);
120}