Make InputDeviceId's constructor constexpr. (#5433)
* Make InputDeviceId's constructor constexpr. See also https://github.com/o3de/o3de/pull/4220 Signed-off-by: bosnichd <bosnichd@amazon.com> * Updates based on review feedback. Signed-off-by: bosnichd <bosnichd@amazon.com>
This commit is contained in:
@@ -48,6 +48,24 @@ namespace InputUnitTests
|
||||
AZStd::unique_ptr<InputSystemComponent> m_inputSystemComponent;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
TEST_F(InputTest, InputChannelId_ConstExpression_CopyConstructorSuccessfull)
|
||||
{
|
||||
constexpr InputChannelId testInputChannelId1("TestInputChannelId");
|
||||
constexpr InputChannelId testInputChannelId2(testInputChannelId1);
|
||||
static_assert(testInputChannelId1 == testInputChannelId2);
|
||||
EXPECT_EQ(testInputChannelId1, testInputChannelId2);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
TEST_F(InputTest, InputDeviceId_ConstExpression_CopyConstructorSuccessfull)
|
||||
{
|
||||
constexpr InputDeviceId testInputDeviceId1("TestInputDeviceId");
|
||||
constexpr InputDeviceId testInputDeviceId2(testInputDeviceId1);
|
||||
static_assert(testInputDeviceId1 == testInputDeviceId2);
|
||||
EXPECT_EQ(testInputDeviceId1, testInputDeviceId2);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
TEST_F(InputTest, InputContext_InitWithDataStruct_InitializationSuccessfull)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user