[mapguide-trac] #364: MgDataPropertyDefinition::Length ,GetLength() and SetLength() can be assigned to with a negative value;

MapGuide Open Source trac_mapguide at osgeo.org
Wed Dec 5 21:56:16 EST 2007


#364: MgDataPropertyDefinition::Length ,GetLength() and SetLength() can be
assigned to with a negative value;
--------------------------+-------------------------------------------------
   Reporter:  jessicacao  |       Owner:  Tom Fukushima                      
       Type:  defect      |      Status:  new                                
   Priority:  medium      |   Milestone:  2.0                                
  Component:  General     |     Version:                                     
   Severity:  major       |    Keywords:  MgDataPropertyDefinition::SetLength
External_id:  985014      |  
--------------------------+-------------------------------------------------
 MgDataPropertyDefinition::Length ,GetLength() and SetLength() can be
 assigned to with a negative value; [[BR]]


 1. Construct an instance of MgDataPropertyDefinition using the following
 code [[BR]]


  MgDataPropertyDefinition dataPropDefinition = new
 MgDataPropertyDefinition("dataPropDefinition");[[BR]]


 2. Assigned a negative value to Length and use method GetLength to return
 the value[[BR]]


     dataPropDefinition.Length = -10; Assert.AreEqual(-10,
 dataPropDefinition.GetLength());[[BR]]


 3. Use the method SetLength to set a negative value, and use Length to
 return the value  [[BR]]


             dataPropDefinition.SetLength(-23);[[BR]]

              Assert.AreEqual(-23, dataPropDefinition.Length);[[BR]]


 Sample code: [[BR]]


    MgDataPropertyDefinition dataPropDefinition = new
 MgDataPropertyDefinition("dataPropDefinition");[[BR]]

             dataPropDefinition.Length = -10;[[BR]]

             Assert.AreEqual(-10, dataPropDefinition.Length);[[BR]]

             Assert.AreEqual(-10, dataPropDefinition.GetLength());[[BR]]


             dataPropDefinition.SetLength(-23);[[BR]]

             Assert.AreEqual(-23 dataPropDefinition.Length);[[BR]]

             Assert.AreEqual(-23, dataPropDefinition.GetLength());[[BR]]

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/364>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list