Files
Bigfoot/Bigfoot/Tests/Utils/Concat.cpp
T
rboullard 50e314be56
Bigfoot / Sonarqube (push) Failing after 0s
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Failing after 0s
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Failing after 0s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Failing after 0s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: ON) (push) Failing after 0s
Bigfoot / Build & Test Release (Unity Build: OFF) (push) Failing after 0s
Bigfoot / Build & Test Release (Unity Build: ON) (push) Failing after 0s
Bigfoot / Clang Format Checks (push) Failing after 0s
Initial commit
2026-08-17 01:14:21 +02:00

37 lines
996 B
C++

/*********************************************************************
* \file Concat.cpp
*
* \author Romain BOULLARD
* \date October 2025
*********************************************************************/
#include <Utils/Concat.h>
#include <gtest/gtest.h>
namespace Bigfoot
{
class ConcatFixture: public ::testing::Test
{
};
/****************************************************************************************/
TEST_F(ConcatFixture, ShouldConcatTheTwoStrings)
{
constexpr std::string_view result = CONCAT("a", "b");
EXPECT_STREQ(result.data(), "ab");
}
/****************************************************************************************/
TEST_F(ConcatFixture, UniqueName)
{
// this looks wrong, but this should expand to test_30 and test_31
constexpr std::uint32_t MAKE_UNIQUE_VARIABLE_NAME(test) = 1;
constexpr std::uint32_t MAKE_UNIQUE_VARIABLE_NAME(test) = 2;
EXPECT_EQ(test_30, 1);
EXPECT_EQ(test_31, 2);
}
} // namespace Bigfoot