mirror of
https://github.com/microsoft/mscclpp.git
synced 2026-05-11 17:00:22 +00:00
21 lines
393 B
C++
21 lines
393 B
C++
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT License.
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
#include <thread>
|
|
|
|
#include "utils_internal.hpp"
|
|
|
|
TEST(UtilsInternalTest, getHostHash) {
|
|
uint64_t hash1 = mscclpp::getHostHash();
|
|
uint64_t hash2;
|
|
|
|
std::thread th([&hash2]() { hash2 = mscclpp::getHostHash(); });
|
|
|
|
ASSERT_TRUE(th.joinable());
|
|
th.join();
|
|
|
|
EXPECT_EQ(hash1, hash2);
|
|
}
|