Code/Framework/AzCore/Tests/Asset/AssetCommon.cpp
TEST_F(WeakAssetTest, DISABLED_WeakAsset_ConstructionAndDestruction_UpdatesAssetDataWeakRefCount)
    {
        TestAssetData testData;
        EXPECT_EQ(testData.GetWeakUseCount(), 0);

        // When transitioning the weak use count from 1 to 0, one assert will fire due to the asset manager not being initialized.
        AZ_TEST_START_TRACE_SUPPRESSION;
        {
            AssetInternal::WeakAsset<TestAssetData> weakAsset(&testData, AssetLoadBehavior::Default);
            EXPECT_EQ(testData.GetWeakUseCount(), 1);
        }
        AZ_TEST_STOP_TRACE_SUPPRESSION(1);

        EXPECT_EQ(testData.GetWeakUseCount(), 0);
    }
// Asset cancellation is temporarily disabled, re-enable this test when cancellation is more stable
Asset cancellation is temporarily disabled, re-enable this test when cancellation is more stable
Asset cancellation is temporarily disabled re - enable this test when cancellation is more stable
TEST_F(WeakAssetTest, DISABLED_WeakAsset_ConstructionAndDestruction_UpdatesAssetDataWeakRefCount)
    {
        TestAssetData testData;
        EXPECT_EQ(testData.GetWeakUseCount(), 0);
        AZ_TEST_START_TRACE_SUPPRESSION;
        {
            AssetInternal::WeakAsset<TestAssetData> weakAsset(&testData, AssetLoadBehavior::Default);
            EXPECT_EQ(testData.GetWeakUseCount(), 1);
        }
        AZ_TEST_STOP_TRACE_SUPPRESSION(1);
        EXPECT_EQ(testData.GetWeakUseCount(), 0);
    }
TEST_F ( WeakAssetTest , DISABLED_WeakAsset_ConstructionAndDestruction_UpdatesAssetDataWeakRefCount ) { TestAssetData testData ; EXPECT_EQ ( testData . GetWeakUseCount ( ) , 0 ) ; AZ_TEST_START_TRACE_SUPPRESSION ; { AssetInternal :: WeakAsset < TestAssetData > weakAsset ( & testData , AssetLoadBehavior :: Default ) ; EXPECT_EQ ( testData . GetWeakUseCount ( ) , 1 ) ; } AZ_TEST_STOP_TRACE_SUPPRESSION ( 1 ) ; EXPECT_EQ ( testData . GetWeakUseCount ( ) , 0 ) ; }
Asset cancellation is temporarily disabled, re-enable this test when cancellation is more stable
Asset cancellation is temporarily disabled re - enable this test when cancellation is more stable
// When transitioning the weak use count from 1 to 0, one assert will fire due to the asset manager not being initialized.