Gems/Atom/RPI/Code/Tests/Buffer/BufferTests.cpp
// Buffer Asset tests
// Buffer asset without initial data
Buffer Asset tests
Buffer asset without initial data
Buffer Asset tests Buffer asset without initial data
TEST_F(BufferTests, BufferAssetCreation_NoInitialData_Success)
    {
        using namespace AZ;
        ExpectedBuffer bufferInfo = CreateValidBuffer();
        RPI::BufferAssetCreator creator;
        creator.Begin(Data::AssetId(AZ::Uuid::CreateRandom()));
        creator.SetPoolAsset(CreateTestBufferPoolAsset());
        creator.SetBufferViewDescriptor(bufferInfo.m_viewDescriptor);
        creator.SetBuffer(nullptr, 0, bufferInfo.m_bufferDescriptor);
        Data::Asset<RPI::BufferAsset> asset;
        EXPECT_TRUE(creator.End(asset));
        EXPECT_TRUE(asset.IsReady());
        EXPECT_NE(asset.Get(), nullptr);
    }
TEST_F ( BufferTests , BufferAssetCreation_NoInitialData_Success ) { using namespace AZ ; ExpectedBuffer bufferInfo = CreateValidBuffer ( ) ; RPI :: BufferAssetCreator creator ; creator . Begin ( Data :: AssetId ( AZ :: Uuid :: CreateRandom ( ) ) ) ; creator . SetPoolAsset ( CreateTestBufferPoolAsset ( ) ) ; creator . SetBufferViewDescriptor ( bufferInfo . m_viewDescriptor ) ; creator . SetBuffer ( nullptr , 0 , bufferInfo . m_bufferDescriptor ) ; Data :: Asset < RPI :: BufferAsset > asset ; EXPECT_TRUE ( creator . End ( asset ) ) ; EXPECT_TRUE ( asset . IsReady ( ) ) ; EXPECT_NE ( asset . Get ( ) , nullptr ) ; }
Buffer Asset tests
Buffer asset without initial data
Buffer Asset tests Buffer asset without initial data
// empty initial data