<!-- (c) Electronic Arts. All Rights Reserved. -->
<TESTCLASS>

<CLASS NAME="UnitTestMatrix44AffinePacked" HEADER="matrix44affinepackedtest.h" SOURCE="matrix44affinepackedtest.inc" RWHOSTHEADER="rw/math/vpu/matrix44affine_operation.h" RWGENERICHEADER="rw/math/fpu/matrix44affine_operation.h" RWOPTIMALHEADER="rw/math/optimal/matrix44affine_operation.h" HOST="true" GENERIC="true" OPTIMAL="true">

<!-- The Last Test is test211, please change this number when you add more tests, make sure test names do not repeat-->

  <TYPE NAME="class">

    <TYPE NAME="correctness">

      <TEST NAME="test41">
      <![CDATA[



        SetFunctionName("Matrix44AffinePacked(float m0, ..., float m15)");
        Matrix44AffinePacked m((float_basic_type)2.0, (float_basic_type)3.0, (float_basic_type)4.0,
                               (float_basic_type)5.0, (float_basic_type)6.0, (float_basic_type)7.0,
                               (float_basic_type)8.0, (float_basic_type)9.0, (float_basic_type)10.0,
                               (float_basic_type)11.0, (float_basic_type)12.0, (float_basic_type)13.0);
        Validate(
            (float_basic_type)m.GetElem( 0) ==  2.0f &&
            (float_basic_type)m.GetElem( 1) ==  3.0f &&
            (float_basic_type)m.GetElem( 2) ==  4.0f &&
            (float_basic_type)m.GetElem( 3) ==  5.0f &&
            (float_basic_type)m.GetElem( 4) ==  6.0f &&
            (float_basic_type)m.GetElem( 5) ==  7.0f &&
            (float_basic_type)m.GetElem( 6) ==  8.0f &&
            (float_basic_type)m.GetElem( 7) ==  9.0f &&
            (float_basic_type)m.GetElem( 8) == 10.0f &&
            (float_basic_type)m.GetElem( 9) == 11.0f &&
            (float_basic_type)m.GetElem(10) == 12.0f &&
            (float_basic_type)m.GetElem(11) == 13.0f
            );



      ]]>
      </TEST>


      <TEST NAME="matrix44affine_vecfloat_construction">
      <![CDATA[

        #ifdef HOST_TESTING

        SetFunctionName("Matrix44AffinePacked(VecFloat m0, ..., VecFloat m15)");
        Matrix44AffinePacked m(VecFloat(2.0f), VecFloat(3.0f), VecFloat(4.0f),
                               VecFloat(5.0f), VecFloat(6.0f), VecFloat(7.0f),
                               VecFloat(8.0f), VecFloat(9.0f), VecFloat(10.0f),
                               VecFloat(11.0f), VecFloat(12.0f), VecFloat(13.0f));
        Validate(
            (float_basic_type)m.GetElem( 0) ==  2.0f &&
            (float_basic_type)m.GetElem( 1) ==  3.0f &&
            (float_basic_type)m.GetElem( 2) ==  4.0f &&
            (float_basic_type)m.GetElem( 3) ==  5.0f &&
            (float_basic_type)m.GetElem( 4) ==  6.0f &&
            (float_basic_type)m.GetElem( 5) ==  7.0f &&
            (float_basic_type)m.GetElem( 6) ==  8.0f &&
            (float_basic_type)m.GetElem( 7) ==  9.0f &&
            (float_basic_type)m.GetElem( 8) == 10.0f &&
            (float_basic_type)m.GetElem( 9) == 11.0f &&
            (float_basic_type)m.GetElem(10) == 12.0f &&
            (float_basic_type)m.GetElem(11) == 13.0f
            );

        #endif

      ]]>
      </TEST>


      <TEST NAME="test42">
      <![CDATA[



        SetFunctionName("Matrix44AffinePacked(Matrix44AffinePacked&)");
        Matrix44AffinePacked m((float_basic_type)2.0, (float_basic_type)3.0, (float_basic_type)4.0,
                               (float_basic_type)5.0, (float_basic_type)6.0, (float_basic_type)7.0,
                               (float_basic_type)8.0, (float_basic_type)9.0, (float_basic_type)10.0,
                               (float_basic_type)11.0, (float_basic_type)12.0, (float_basic_type)13.0);
        Matrix44AffinePacked mat(m);
        Validate(
            (float_basic_type)mat.GetElem( 0) ==  2.0f &&
            (float_basic_type)mat.GetElem( 1) ==  3.0f &&
            (float_basic_type)mat.GetElem( 2) ==  4.0f &&
            (float_basic_type)mat.GetElem( 3) ==  5.0f &&
            (float_basic_type)mat.GetElem( 4) ==  6.0f &&
            (float_basic_type)mat.GetElem( 5) ==  7.0f &&
            (float_basic_type)mat.GetElem( 6) ==  8.0f &&
            (float_basic_type)mat.GetElem( 7) ==  9.0f &&
            (float_basic_type)mat.GetElem( 8) == 10.0f &&
            (float_basic_type)mat.GetElem( 9) == 11.0f &&
            (float_basic_type)mat.GetElem(10) == 12.0f &&
            (float_basic_type)mat.GetElem(11) == 13.0f
            );



      ]]>
      </TEST>


      <TEST NAME="test43">
      <![CDATA[



        SetFunctionName("Matrix44AffinePacked(Matrix44Affine&)");
        Matrix44Affine m44Affine((float_basic_type)2.0, (float_basic_type)3.0, (float_basic_type)4.0,
                                 (float_basic_type)5.0, (float_basic_type)6.0, (float_basic_type)7.0,
                                 (float_basic_type)8.0, (float_basic_type)9.0, (float_basic_type)10.0,
                                 (float_basic_type)11.0, (float_basic_type)12.0, (float_basic_type)13.0);
        Matrix44AffinePacked mat1(m44Affine);
        Validate(
            (float_basic_type)mat1.GetElem( 0) ==  2.0f &&
            (float_basic_type)mat1.GetElem( 1) ==  3.0f &&
            (float_basic_type)mat1.GetElem( 2) ==  4.0f &&
            (float_basic_type)mat1.GetElem( 3) ==  5.0f &&
            (float_basic_type)mat1.GetElem( 4) ==  6.0f &&
            (float_basic_type)mat1.GetElem( 5) ==  7.0f &&
            (float_basic_type)mat1.GetElem( 6) ==  8.0f &&
            (float_basic_type)mat1.GetElem( 7) ==  9.0f &&
            (float_basic_type)mat1.GetElem( 8) == 10.0f &&
            (float_basic_type)mat1.GetElem( 9) == 11.0f &&
            (float_basic_type)mat1.GetElem(10) == 12.0f &&
            (float_basic_type)mat1.GetElem(11) == 13.0f
            );



      ]]>
      </TEST>
      
      <TEST NAME="construct_matrix44affinepacked_from_matrix44">
      <![CDATA[



        SetFunctionName("Matrix44AffinePacked(Matrix44&)");
        Matrix44 m44((float_basic_type)2.0,   (float_basic_type)3.0,  (float_basic_type)4.0, (float_basic_type)0.0f,
                     (float_basic_type)5.0,   (float_basic_type)6.0,  (float_basic_type)7.0, (float_basic_type)0.0f,
                     (float_basic_type)8.0,   (float_basic_type)9.0, (float_basic_type)10.0, (float_basic_type)0.0f,
                     (float_basic_type)11.0, (float_basic_type)12.0, (float_basic_type)13.0, (float_basic_type)1.0f);
        Matrix44AffinePacked mat1(m44);
        Validate(
            (float_basic_type)mat1.GetElem( 0) ==  2.0f &&
            (float_basic_type)mat1.GetElem( 1) ==  3.0f &&
            (float_basic_type)mat1.GetElem( 2) ==  4.0f &&
            (float_basic_type)mat1.GetElem( 3) ==  5.0f &&
            (float_basic_type)mat1.GetElem( 4) ==  6.0f &&
            (float_basic_type)mat1.GetElem( 5) ==  7.0f &&
            (float_basic_type)mat1.GetElem( 6) ==  8.0f &&
            (float_basic_type)mat1.GetElem( 7) ==  9.0f &&
            (float_basic_type)mat1.GetElem( 8) == 10.0f &&
            (float_basic_type)mat1.GetElem( 9) == 11.0f &&
            (float_basic_type)mat1.GetElem(10) == 12.0f &&
            (float_basic_type)mat1.GetElem(11) == 13.0f
            );



      ]]>
      </TEST>
      
      <TEST NAME="test208">
      <![CDATA[

#ifdef HOST_TESTING
        SetFunctionName("const VecFloatRefIndex Matrix44AffinePacked::GetElem(int row, int column) const");
        Matrix44AffinePacked m((float_basic_type)2.0, (float_basic_type)3.0, (float_basic_type)4.0,
                               (float_basic_type)5.0, (float_basic_type)6.0, (float_basic_type)7.0,
                               (float_basic_type)8.0, (float_basic_type)9.0, (float_basic_type)10.0,
                               (float_basic_type)11.0, (float_basic_type)12.0, (float_basic_type)13.0);
        Validate(
            (float_basic_type)m.GetElem(0, 0) ==  2.0f &&
            (float_basic_type)m.GetElem(0, 1) ==  3.0f &&
            (float_basic_type)m.GetElem(0, 2) ==  4.0f &&
            (float_basic_type)m.GetElem(1, 0) ==  5.0f &&
            (float_basic_type)m.GetElem(1, 1) ==  6.0f &&
            (float_basic_type)m.GetElem(1, 2) ==  7.0f &&
            (float_basic_type)m.GetElem(2, 0) ==  8.0f &&
            (float_basic_type)m.GetElem(2, 1) ==  9.0f &&
            (float_basic_type)m.GetElem(2, 2) == 10.0f &&
            (float_basic_type)m.GetElem(3, 0) == 11.0f &&
            (float_basic_type)m.GetElem(3, 1) == 12.0f &&
            (float_basic_type)m.GetElem(3, 2) == 13.0f
            );
#endif

      ]]>
      </TEST>      
      
      <TEST NAME="test209">
      <![CDATA[

#ifdef HOST_TESTING
        SetFunctionName("void Matrix44AffinePacked::Set(Vector3::InParam row0, Vector3::InParam row1, Vector3::InParam row2, Vector3::InParam row3)");
        Matrix44AffinePacked mat1((float_basic_type)0.0, (float_basic_type)0.0, (float_basic_type)0.0,
                                  (float_basic_type)0.0, (float_basic_type)0.0, (float_basic_type)0.0,
                                  (float_basic_type)0.0, (float_basic_type)0.0, (float_basic_type)0.0,
                                  (float_basic_type)0.0, (float_basic_type)0.0, (float_basic_type)0.0);
        Vector3 row0((float_basic_type)2.0, (float_basic_type)3.0, (float_basic_type)4.0);
        Vector3 row1((float_basic_type)5.0, (float_basic_type)6.0, (float_basic_type)7.0);
        Vector3 row2((float_basic_type)8.0, (float_basic_type)9.0, (float_basic_type)10.0);
        Vector3 row3((float_basic_type)11.0, (float_basic_type)12.0, (float_basic_type)13.0);
        mat1.Set(row0, row1, row2, row3);
        Validate(
            (float_basic_type)mat1.GetElem( 0) ==  (float_basic_type)2.0 &&
            (float_basic_type)mat1.GetElem( 1) ==  (float_basic_type)3.0 &&
            (float_basic_type)mat1.GetElem( 2) ==  (float_basic_type)4.0 &&
            (float_basic_type)mat1.GetElem( 3) ==  (float_basic_type)5.0 &&
            (float_basic_type)mat1.GetElem( 4) ==  (float_basic_type)6.0 &&
            (float_basic_type)mat1.GetElem( 5) ==  (float_basic_type)7.0 &&
            (float_basic_type)mat1.GetElem( 6) ==  (float_basic_type)8.0 &&
            (float_basic_type)mat1.GetElem( 7) ==  (float_basic_type)9.0 &&
            (float_basic_type)mat1.GetElem( 8) == (float_basic_type)10.0 &&
            (float_basic_type)mat1.GetElem( 9) == (float_basic_type)11.0 &&
            (float_basic_type)mat1.GetElem(10) == (float_basic_type)12.0 &&
            (float_basic_type)mat1.GetElem(11) == (float_basic_type)13.0
            );
#endif

      ]]>
      </TEST>
      
      <TEST NAME="test210">
      <![CDATA[

#ifdef HOST_TESTING
        SetFunctionName("void Matrix44AffinePacked::SetElem(int row, int col, VecFloat::InParam f)");
        Matrix44AffinePacked mat1((float_basic_type)0.0, (float_basic_type)0.0, (float_basic_type)0.0,
                                  (float_basic_type)0.0, (float_basic_type)0.0, (float_basic_type)0.0,
                                  (float_basic_type)0.0, (float_basic_type)0.0, (float_basic_type)0.0,
                                  (float_basic_type)0.0, (float_basic_type)0.0, (float_basic_type)0.0);
        mat1.SetElem(0, 0,  (float_basic_type)2.0);
        mat1.SetElem(0, 1,  (float_basic_type)3.0);
        mat1.SetElem(0, 2,  (float_basic_type)4.0);
        mat1.SetElem(1, 0,  (float_basic_type)5.0);
        mat1.SetElem(1, 1,  (float_basic_type)6.0);
        mat1.SetElem(1, 2,  (float_basic_type)7.0);
        mat1.SetElem(2, 0,  (float_basic_type)8.0);
        mat1.SetElem(2, 1,  (float_basic_type)9.0);
        mat1.SetElem(2, 2, (float_basic_type)10.0);
        mat1.SetElem(3, 0, (float_basic_type)11.0);
        mat1.SetElem(3, 1, (float_basic_type)12.0);
        mat1.SetElem(3, 2, (float_basic_type)13.0);      
       Validate(
            (float_basic_type)mat1.GetElem( 0) ==  (float_basic_type)2.0 &&
            (float_basic_type)mat1.GetElem( 1) ==  (float_basic_type)3.0 &&
            (float_basic_type)mat1.GetElem( 2) ==  (float_basic_type)4.0 &&
            (float_basic_type)mat1.GetElem( 3) ==  (float_basic_type)5.0 &&
            (float_basic_type)mat1.GetElem( 4) ==  (float_basic_type)6.0 &&
            (float_basic_type)mat1.GetElem( 5) ==  (float_basic_type)7.0 &&
            (float_basic_type)mat1.GetElem( 6) ==  (float_basic_type)8.0 &&
            (float_basic_type)mat1.GetElem( 7) ==  (float_basic_type)9.0 &&
            (float_basic_type)mat1.GetElem( 8) == (float_basic_type)10.0 &&
            (float_basic_type)mat1.GetElem( 9) == (float_basic_type)11.0 &&
            (float_basic_type)mat1.GetElem(10) == (float_basic_type)12.0 &&
            (float_basic_type)mat1.GetElem(11) == (float_basic_type)13.0
            );
#endif

      ]]>
      </TEST>
      
      
      <TEST NAME="test211">
      <![CDATA[

#ifdef HOST_TESTING
        SetFunctionName("void Matrix44AffinePacked::SetElem(int i, VecFloat::InParam f)");
        Matrix44AffinePacked mat1((float_basic_type)0.0, (float_basic_type)0.0, (float_basic_type)0.0,
                                  (float_basic_type)0.0, (float_basic_type)0.0, (float_basic_type)0.0,
                                  (float_basic_type)0.0, (float_basic_type)0.0, (float_basic_type)0.0,
                                  (float_basic_type)0.0, (float_basic_type)0.0, (float_basic_type)0.0);
        mat1.SetElem(0,   (float_basic_type)2.0);
        mat1.SetElem(1,   (float_basic_type)3.0);
        mat1.SetElem(2,   (float_basic_type)4.0);
        mat1.SetElem(3,   (float_basic_type)5.0);
        mat1.SetElem(4,   (float_basic_type)6.0);
        mat1.SetElem(5,   (float_basic_type)7.0);
        mat1.SetElem(6,   (float_basic_type)8.0);
        mat1.SetElem(7,   (float_basic_type)9.0);
        mat1.SetElem(8,  (float_basic_type)10.0);
        mat1.SetElem(9,  (float_basic_type)11.0);
        mat1.SetElem(10, (float_basic_type)12.0);
        mat1.SetElem(11, (float_basic_type)13.0);      
       Validate(
            (float_basic_type)mat1.GetElem( 0) ==  (float_basic_type)2.0 &&
            (float_basic_type)mat1.GetElem( 1) ==  (float_basic_type)3.0 &&
            (float_basic_type)mat1.GetElem( 2) ==  (float_basic_type)4.0 &&
            (float_basic_type)mat1.GetElem( 3) ==  (float_basic_type)5.0 &&
            (float_basic_type)mat1.GetElem( 4) ==  (float_basic_type)6.0 &&
            (float_basic_type)mat1.GetElem( 5) ==  (float_basic_type)7.0 &&
            (float_basic_type)mat1.GetElem( 6) ==  (float_basic_type)8.0 &&
            (float_basic_type)mat1.GetElem( 7) ==  (float_basic_type)9.0 &&
            (float_basic_type)mat1.GetElem( 8) == (float_basic_type)10.0 &&
            (float_basic_type)mat1.GetElem( 9) == (float_basic_type)11.0 &&
            (float_basic_type)mat1.GetElem(10) == (float_basic_type)12.0 &&
            (float_basic_type)mat1.GetElem(11) == (float_basic_type)13.0
            );
#endif

      ]]>
      </TEST>

    </TYPE>


  </TYPE>
  

</CLASS>

</TESTCLASS>
