fixes some uninit bool loads (#5644)
This commit fixes some bool loads which are not initialized. With ubsan and the "option -fsanitize=bool", this results in a runtime error during test execution. Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
This commit is contained in:
co-authored by
Kim Kulling
parent
dd1474e280
commit
35976a4eb4
@@ -242,6 +242,22 @@ TEST_F( utMetadata, copy_test ) {
|
||||
EXPECT_EQ( i32v, v );
|
||||
}
|
||||
|
||||
// uint32_t test
|
||||
{
|
||||
uint32_t v = 0;
|
||||
bool ok = copy.Get("uint32_t", v);
|
||||
EXPECT_TRUE(ok);
|
||||
EXPECT_EQ( ui32, v );
|
||||
}
|
||||
|
||||
// int64_t test
|
||||
{
|
||||
int64_t v = -1;
|
||||
bool ok = copy.Get("int64_t", v);
|
||||
EXPECT_TRUE(ok);
|
||||
EXPECT_EQ( i64, v );
|
||||
}
|
||||
|
||||
// uint64_t test
|
||||
{
|
||||
uint64_t v = 255;
|
||||
@@ -264,14 +280,14 @@ TEST_F( utMetadata, copy_test ) {
|
||||
EXPECT_EQ( dv, v );
|
||||
}
|
||||
|
||||
// bool test
|
||||
// string test
|
||||
{
|
||||
aiString v;
|
||||
EXPECT_TRUE( copy.Get( "aiString", v ) );
|
||||
EXPECT_EQ( strVal, v );
|
||||
}
|
||||
|
||||
// bool test
|
||||
// vector test
|
||||
{
|
||||
aiVector3D v;
|
||||
EXPECT_TRUE( copy.Get( "aiVector3D", v ) );
|
||||
|
||||
Reference in New Issue
Block a user