src/third_party/angle/src/libANGLE/angletypes_unittest.cpp
// Test the initial state of BlendStateExt
Test the initial state of BlendStateExt
Test the initial state of BlendStateExt
TEST(BlendStateExt, Init)
{
    {
        const gl::BlendStateExt blendStateExt = gl::BlendStateExt(1);
        ASSERT_EQ(blendStateExt.mMaxDrawBuffers, 1u);
        ASSERT_EQ(blendStateExt.mMaxEnabledMask.to_ulong(), 1u);
        ASSERT_EQ(blendStateExt.mMaxColorMask, is64Bit ? 0xFFu : 0xFu);
        ASSERT_EQ(blendStateExt.mMaxEquationMask, is64Bit ? 0xFFu : 0xFu);
        ASSERT_EQ(blendStateExt.mMaxFactorMask, 0xFFu);
        checkInitState(blendStateExt);
    }
    {
        const gl::BlendStateExt blendStateExt = gl::BlendStateExt(4);
        ASSERT_EQ(blendStateExt.mMaxDrawBuffers, 4u);
        ASSERT_EQ(blendStateExt.mMaxEnabledMask.to_ulong(), 0xFu);
        ASSERT_EQ(blendStateExt.mMaxColorMask, is64Bit ? 0xFFFFFFFFu : 0xFFFFu);
        ASSERT_EQ(blendStateExt.mMaxEquationMask, is64Bit ? 0xFFFFFFFFu : 0xFFFFu);
        ASSERT_EQ(blendStateExt.mMaxFactorMask, 0xFFFFFFFFu);
        checkInitState(blendStateExt);
    }
    {
        const gl::BlendStateExt blendStateExt = gl::BlendStateExt(8);
        ASSERT_EQ(blendStateExt.mMaxDrawBuffers, 8u);
        ASSERT_EQ(blendStateExt.mMaxEnabledMask.to_ulong(), 0xFFu);
        ASSERT_EQ(blendStateExt.mMaxColorMask, is64Bit ? 0xFFFFFFFFFFFFFFFFu : 0xFFFFFFFFu);
        ASSERT_EQ(blendStateExt.mMaxEquationMask, is64Bit ? 0xFFFFFFFFFFFFFFFFu : 0xFFFFFFFFu);
        ASSERT_EQ(blendStateExt.mMaxFactorMask, 0xFFFFFFFFFFFFFFFFu);
        checkInitState(blendStateExt);
    }
}
TEST ( BlendStateExt , Init ) { { const gl :: BlendStateExt blendStateExt = gl :: BlendStateExt ( 1 ) ; ASSERT_EQ ( blendStateExt . mMaxDrawBuffers , 1u ) ; ASSERT_EQ ( blendStateExt . mMaxEnabledMask . to_ulong ( ) , 1u ) ; ASSERT_EQ ( blendStateExt . mMaxColorMask , is64Bit ? 0xFFu : 0xFu ) ; ASSERT_EQ ( blendStateExt . mMaxEquationMask , is64Bit ? 0xFFu : 0xFu ) ; ASSERT_EQ ( blendStateExt . mMaxFactorMask , 0xFFu ) ; checkInitState ( blendStateExt ) ; } { const gl :: BlendStateExt blendStateExt = gl :: BlendStateExt ( 4 ) ; ASSERT_EQ ( blendStateExt . mMaxDrawBuffers , 4u ) ; ASSERT_EQ ( blendStateExt . mMaxEnabledMask . to_ulong ( ) , 0xFu ) ; ASSERT_EQ ( blendStateExt . mMaxColorMask , is64Bit ? 0xFFFFFFFFu : 0xFFFFu ) ; ASSERT_EQ ( blendStateExt . mMaxEquationMask , is64Bit ? 0xFFFFFFFFu : 0xFFFFu ) ; ASSERT_EQ ( blendStateExt . mMaxFactorMask , 0xFFFFFFFFu ) ; checkInitState ( blendStateExt ) ; } { const gl :: BlendStateExt blendStateExt = gl :: BlendStateExt ( 8 ) ; ASSERT_EQ ( blendStateExt . mMaxDrawBuffers , 8u ) ; ASSERT_EQ ( blendStateExt . mMaxEnabledMask . to_ulong ( ) , 0xFFu ) ; ASSERT_EQ ( blendStateExt . mMaxColorMask , is64Bit ? 0xFFFFFFFFFFFFFFFFu : 0xFFFFFFFFu ) ; ASSERT_EQ ( blendStateExt . mMaxEquationMask , is64Bit ? 0xFFFFFFFFFFFFFFFFu : 0xFFFFFFFFu ) ; ASSERT_EQ ( blendStateExt . mMaxFactorMask , 0xFFFFFFFFFFFFFFFFu ) ; checkInitState ( blendStateExt ) ; } }
Test the initial state of BlendStateExt
Test the initial state of BlendStateExt