Gems/Atom/RPI/Code/Tests/Material/MaterialTypeSourceDataTests.cpp
void ValidateCommonDescriptorFields(const MaterialTypeSourceData::PropertyDefinition& expectedValues, const MaterialPropertyDescriptor* propertyDescriptor)
        {
            EXPECT_EQ(propertyDescriptor->GetDataType(), expectedValues.m_dataType);
            EXPECT_EQ(propertyDescriptor->GetOutputConnections().size(), expectedValues.m_outputConnections.size());
            for (int i = 0; i < expectedValues.m_outputConnections.size() && i < propertyDescriptor->GetOutputConnections().size(); ++i)
            {
                EXPECT_EQ(propertyDescriptor->GetOutputConnections()[i].m_type, expectedValues.m_outputConnections[i].m_type);
                EXPECT_EQ(propertyDescriptor->GetOutputConnections()[i].m_containerIndex.GetIndex(), expectedValues.m_outputConnections[i].m_shaderIndex);
            }
        }
//! Checks for a match between source data and MaterialPropertyDescriptor, for only the fields that correspond 1:1.
//! (Note this function can't be used in every case, because there are cases where output connections will not correspond 1:1)
Checks for a match between source data and MaterialPropertyDescriptor, for only the fields that correspond 1:1.
(Note this function can't be used in every case, because there are cases where output connections will not correspond 1:1)
Checks for a match between source data and MaterialPropertyDescriptor for only the fields that correspond 1 : 1 . ( Note this function can ' t be used in every case because there are cases where output connections will not correspond 1 : 1 )
void ValidateCommonDescriptorFields(const MaterialTypeSourceData::PropertyDefinition& expectedValues, const MaterialPropertyDescriptor* propertyDescriptor)
        {
            EXPECT_EQ(propertyDescriptor->GetDataType(), expectedValues.m_dataType);
            EXPECT_EQ(propertyDescriptor->GetOutputConnections().size(), expectedValues.m_outputConnections.size());
            for (int i = 0; i < expectedValues.m_outputConnections.size() && i < propertyDescriptor->GetOutputConnections().size(); ++i)
            {
                EXPECT_EQ(propertyDescriptor->GetOutputConnections()[i].m_type, expectedValues.m_outputConnections[i].m_type);
                EXPECT_EQ(propertyDescriptor->GetOutputConnections()[i].m_containerIndex.GetIndex(), expectedValues.m_outputConnections[i].m_shaderIndex);
            }
        }
void ValidateCommonDescriptorFields ( const MaterialTypeSourceData :: PropertyDefinition & expectedValues , const MaterialPropertyDescriptor * propertyDescriptor ) { EXPECT_EQ ( propertyDescriptor -> GetDataType ( ) , expectedValues . m_dataType ) ; EXPECT_EQ ( propertyDescriptor -> GetOutputConnections ( ) . size ( ) , expectedValues . m_outputConnections . size ( ) ) ; for ( int i = 0 ; i < expectedValues . m_outputConnections . size ( ) && i < propertyDescriptor -> GetOutputConnections ( ) . size ( ) ; ++ i ) { EXPECT_EQ ( propertyDescriptor -> GetOutputConnections ( ) [ i ] . m_type , expectedValues . m_outputConnections [ i ] . m_type ) ; EXPECT_EQ ( propertyDescriptor -> GetOutputConnections ( ) [ i ] . m_containerIndex . GetIndex ( ) , expectedValues . m_outputConnections [ i ] . m_shaderIndex ) ; } }
Checks for a match between source data and MaterialPropertyDescriptor, for only the fields that correspond 1:1.
Checks for a match between source data and MaterialPropertyDescriptor for only the fields that correspond 1 : 1 .