Exemplo n.º 1
0
 [Test]// mapping(uint=>uint) simpleMap; //6
 public void TestSimpleMap()
 {
     /*
      *         simpleMap[4] = 42;
      *  simpleMap[8] = 42;
      *  simpleMap[10] = 42;*/
     TestUtility.CheckMapItem("4", TestUtility.CheckValueFunction, variableList[7 + startInd], new TestUtility.CheckValues
     {
         parentName = "simpleMap",
         value      = "43"
     });
     TestUtility.CheckMapItem("8", TestUtility.CheckValueFunction, variableList[7 + startInd], new TestUtility.CheckValues
     {
         parentName = "simpleMap",
         value      = "59"
     });
     TestUtility.CheckMapItem("10", TestUtility.CheckValueFunction, variableList[7 + startInd], new TestUtility.CheckValues
     {
         parentName = "simpleMap",
         value      = "42"
     });
     TestUtility.CheckMapItem("12", TestUtility.CheckValueFunction, variableList[7 + startInd], new TestUtility.CheckValues
     {
         parentName = "simpleMap",
         value      = "45"
     });
 }
Exemplo n.º 2
0
 [Test]// structMap //6
 public void TeststructMap()
 {
     TestUtility.CheckMapItem("4", TestUtility.StructCheckFunction, variableList[8 + startInd], new TestUtility.CheckValues
     {
         parentName = "structMap",
         nameValues = new List <TestUtility.NameValues>
         {
             {
                 new TestUtility.NameValues {
                     Name = "slot0off0", Value = "14"
                 }
             },
             {
                 new TestUtility.NameValues {
                     Name = "slot0off8", Value = "19"
                 }
             },
             {
                 new TestUtility.NameValues {
                     Name = "slot1off130", Value = "29"
                 }
             }
         }
     });
     TestUtility.CheckMapItem("1", TestUtility.StructCheckFunction, variableList[8 + startInd], new TestUtility.CheckValues
     {
         parentName = "structMap",
         nameValues = new List <TestUtility.NameValues>
         {
             {
                 new TestUtility.NameValues {
                     Name = "slot0off0", Value = "21"
                 }
             },
             {
                 new TestUtility.NameValues {
                     Name = "slot0off8", Value = "2"
                 }
             },
             {
                 new TestUtility.NameValues {
                     Name = "slot1off130", Value = "231"
                 }
             }
         }
     });
 }