Skip to content

Commit

Permalink
add some tests
Browse files Browse the repository at this point in the history
Signed-off-by: Ludovic Le Brun <[email protected]>
  • Loading branch information
ludovic-smile committed Jun 14, 2024
1 parent 77e6ce9 commit 53c5825
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@ TEST(HNZConfig, TestConfigBAD) {

}

TEST(HNZConfig, TestConfigEmpty) {

HnzConfig config("", ""exchanged_data.substr(20)"");
ASSERT_EQ(config.IsProtocolConfigComplete(), false);
ASSERT_EQ(config.IsExchangeConfigComplete(), false);

}

TEST(HNZConfig, TestConfigNodRemoteAddress) {

HnzConfig config(protocol_stack_no_remote_address, exchanged_data);
Expand Down
10 changes: 10 additions & 0 deletions tests/test_server_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,14 @@ TEST(HNZServerWrapper, TestHNZServerReceiving_loop) {
// Launch the thread
std::thread t1(&EnhancedHNZServer::receiving_loop,&m_server1);
t1.join();

ASSERT_NO_THROW(m_server1.startHNZServer());

m_server1.ServerIsReady(3);
// Launch the thread
std::thread t2(&EnhancedHNZServer::receiving_loop,&m_server1);

ASSERT_NO_THROW(m_server1.stopHNZServer());

t2.join();
}

0 comments on commit 53c5825

Please sign in to comment.