Code Coverage Unit Tests for comm.h (#1783)

* File containing test for comm.h

* Update CommTest.cpp

Added gtest API for assert

* Update CommTest.cpp

Adding copyright

* Update CommTest.cpp

Removing info and tested as not required.

* Update and rename CommTest.cpp to CommTests.cpp

* Update CMakeLists.txt
This commit is contained in:
ishkool
2025-08-16 04:14:24 +05:30
committed by GitHub
parent c3b8de4ec8
commit 6453273aa6
2 changed files with 29 additions and 2 deletions
+3 -2
View File
@@ -141,12 +141,13 @@ if(BUILD_TESTS)
AltRsmiTests.cpp
AllocTests.cpp
ArgCheckTests.cpp
BitOpsTests.cpp
IpcsocketTests.cpp
CollRegTests.cpp
CommTests.cpp
P2pTests.cpp
RcclWrapTests.cpp
ShmTests.cpp
P2pTests.cpp
BitOpsTests.cpp
TransportTests.cpp
common/main_fixtures.cpp
common/EnvVars.cpp
+26
View File
@@ -0,0 +1,26 @@
/*************************************************************************
* Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved.
*
* See LICENSE.txt for license information
************************************************************************/
#include "gtest/gtest.h"
#include "comm.h"
namespace RcclUnitTesting
{
TEST(CommTests, Sorter)
{
// Configuration
ncclTaskCollSorter* me_ptr = new ncclTaskCollSorter;
me_ptr->head = nullptr;
ASSERT_EQ(ncclTaskCollSorterEmpty(me_ptr), true);
delete me_ptr;
}
}