MCPcopy Create free account
hub / github.com/defold/defold / AssertVectorTypeContainerFloat

Function AssertVectorTypeContainerFloat

engine/graphics/src/test/test_graphics.cpp:796–805  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

794}
795
796static void AssertVectorTypeContainerFloat(const VectorTypeContainer<float>& expected, const VectorTypeContainer<float>& actual)
797{
798 ASSERT_NEAR(expected.m_Scalar, actual.m_Scalar, EPSILON);
799 ASSERT_VECF(expected.m_Vec2, actual.m_Vec2, 2);
800 ASSERT_VECF(expected.m_Vec3, actual.m_Vec3, 3);
801 ASSERT_VECF(expected.m_Vec4, actual.m_Vec4, 4);
802 ASSERT_VECF(expected.m_Mat2, actual.m_Mat2, 4);
803 ASSERT_VECF(expected.m_Mat3, actual.m_Mat3, 9);
804 ASSERT_VECF(expected.m_Mat4, actual.m_Mat4, 16);
805}
806
807static void RunAllAttributeTest(float* values, uint32_t num_values, dmGraphics::VertexAttribute::SemanticType semantic_type, dmGraphics::VertexAttribute::DataType data_type, dmGraphics::VertexAttribute::VectorType value_vector_type, const VectorTypeContainer<float>& expected)
808{

Callers 2

RunAllAttributeTestFunction · 0.85
TEST_FFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected