/* * Copyright (c) Contributors to the Open 3D Engine Project. * For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ #pragma once #include #include #include #include namespace UnitTest { template void CheckPropertyValue(const AZ::Data::Asset& asset, const AZ::Name& propertyName, T expectedValue) { const AZ::RPI::MaterialPropertyIndex propertyIndex = asset->GetMaterialPropertiesLayout()->FindPropertyIndex(propertyName); AZ::RPI::MaterialPropertyValue value = asset->GetDefaultPropertyValues()[propertyIndex.GetIndex()]; EXPECT_TRUE(value == expectedValue); } void AddMaterialPropertyForSrg( AZ::RPI::MaterialTypeAssetCreator& materialTypeCreator, const AZ::Name& propertyName, AZ::RPI::MaterialPropertyDataType dataType, const AZ::Name& shaderInputName); void AddCommonTestMaterialProperties(AZ::RPI::MaterialTypeAssetCreator& materialTypeCreator, AZStd::string propertyGroupPrefix = ""); AZ::RHI::Ptr CreateCommonTestMaterialSrgLayout(); } //namespace UnitTest