   assertEqual(intVal1.getValue(), -1001);
   
   intVal1.getValueString(outBuf);
-  
   assertEqual(strcmp (outBuf, "-10.01"), 0);
 }
+
+test(int_comparisons)
+{
+  Value<int> intVal1;
+  Value<int> intVal2;
+
+  assertTrue(intVal1 == intVal2);
+
+  intVal1.setValue(10);
+  assertTrue( intVal1 != intVal2);
+  assertTrue( intVal1 > intVal2);
+  assertTrue( intVal1 >= intVal2);
+  assertFalse( intVal1 < intVal2);
+  assertFalse( intVal1 <= intVal2);
+  
+  intVal2.setValue(10);
+  assertTrue(intVal1 == intVal2);
+  assertFalse( intVal1 > intVal2);
+  assertTrue( intVal1 >= intVal2);
+  assertFalse( intVal1 < intVal2);
+  assertTrue( intVal1 <= intVal2);
+}
+
+test(int_math)
+{
+  Value<int> intVal1;
+  Value<int> intVal2;
+  Value<int> intVal3;
+
+  intVal1.setValue(10);
+  assertEqual(intVal1.getValue(), 10);
+
+  assertFalse(intVal1 == intVal2);
+
+  intVal3.setValue(10);
+  assertTrue(intVal1 == intVal3);
+  
+  
+  intVal2 = intVal1;
+  assertTrue(intVal1 == intVal2);
+
+  intVal1.setValue(20);
+  assertEqual(intVal1.getValue(), 20);
+  assertFalse(intVal1 == intVal2);
+
+  assertEqual(intVal1 + intVal2, 30);
+
+  assertEqual(intVal1 - intVal2, 10);
+ 
+  assertEqual(intVal1 * intVal2, 200);
+  
+  assertEqual(intVal1 / intVal2, 2);
+}
+
+test(int_persist)
+{
+  Value<int> intVal1;
+  assertFalse(intVal1.hasChanged());
+  
+  intVal1.setValue(10);
+  assertTrue(intVal1.hasChanged());
+
+  intVal1.persistValue();
+  assertFalse(intVal1.hasChanged());
+
+  intVal1.setValue(0);
+  assertTrue(intVal1.hasChanged());
+
+  intVal1.revertValue();
+  assertEqual(intVal1.getValue(), 10);
+  assertFalse(intVal1.hasChanged());
+
+  intVal1.initValue(20);
+  assertEqual(intVal1.getValue(), 20);
+  assertFalse(intVal1.hasChanged());
+}
+
+test(uint_default_is_0)
+{
+  Value<unsigned int> uintVal1;
+  
+  assertEqual(uintVal1.getValue(), 0);
+  
+  uintVal1.getValueString(outBuf);
+  assertEqual(strcmp (outBuf, "0"), 0);
+  
+}
+
+test(uint_setValue_1_default_format)
+{
+  Value<unsigned int> uintVal1;
+  uintVal1.setValue(1);
+  
+  assertEqual(uintVal1.getValue(), 1);
+  
+  uintVal1.getValueString(outBuf);
+  assertEqual(strcmp (outBuf, "1"), 0);
+}
+
+
+test(uint_setValue_1_01_fixed_pouint_2_decimals)
+{
+  Value<unsigned int> uintVal1(1,2);
+  uintVal1.setValue(101);
+  
+  assertEqual(uintVal1.getValue(), 101);
+  
+  uintVal1.getValueString(outBuf);
+  assertEqual(strcmp (outBuf, "1.01"), 0);
+}
+
+test(uint_setValue_1_01_fixed_pouint_scaled_by_10)
+{
+  Value<unsigned int> uintVal1(1,2,10);
+  uintVal1.setValue(1010);
+  
+  assertEqual(uintVal1.getValue(), 1010);
+  
+  uintVal1.getValueString(outBuf);
+  assertEqual(strcmp (outBuf, "1.01"), 0);
+}
+
+test(ulong_default_is_0)
+{
+  Value<unsigned long> uintVal1;
+  
+  assertEqual(uintVal1.getValue(), 0);
+  
+  uintVal1.getValueString(outBuf);
+  assertEqual(strcmp (outBuf, "0"), 0);
+  
+}
+
+test(ulong_setValue_1_default_format)
+{
+  Value<unsigned long> uintVal1;
+  uintVal1.setValue(1);
+  
+  assertEqual(uintVal1.getValue(), 1);
+  
+  uintVal1.getValueString(outBuf);
+  assertEqual(strcmp (outBuf, "1"), 0);
+}
+
+
+test(ulong_setValue_1_01_fixed_point_2_decimals)
+{
+  Value<unsigned long> uintVal1(1,2);
+  uintVal1.setValue(101);
+  
+  assertEqual(uintVal1.getValue(), 101);
+  
+  uintVal1.getValueString(outBuf);
+  assertEqual(strcmp (outBuf, "1.01"), 0);
+}
+
+test(ulong_setValue_1_01_fixed_point_scaled_by_10)
+{
+  Value<unsigned long> uintVal1(1,2,10);
+  uintVal1.setValue(1010);
+  
+  assertEqual(uintVal1.getValue(), 1010);
+  
+  uintVal1.getValueString(outBuf);
+  assertEqual(strcmp (outBuf, "1.01"), 0);
+}
+
 
 
 


char outBuf[80];


test(float_default_is_0_0)
{

  assertEqual(strcmp (outBuf, "1.01"), 0);
}

test(float_comparisons)
{
  Value<float> floatVal1;
  Value<float> floatVal2;

  assertTrue(floatVal1 == floatVal2);

  floatVal1.setValue(10.0);
  assertTrue( floatVal1 != floatVal2);
  assertTrue( floatVal1 > floatVal2);
  assertTrue( floatVal1 >= floatVal2);
  assertFalse( floatVal1 < floatVal2);
  assertFalse( floatVal1 <= floatVal2);
  
  floatVal2.setValue(10.0);
  assertTrue(floatVal1 == floatVal2);
  assertFalse( floatVal1 > floatVal2);
  assertTrue( floatVal1 >= floatVal2);
  assertFalse( floatVal1 < floatVal2);
  assertTrue( floatVal1 <= floatVal2);
  
}

test(float_math)
{
  Value<float> floatVal1;
  Value<float> floatVal2;
  Value<float> floatVal3;

  floatVal1.setValue(10.0);
  assertEqual(floatVal1.getValue(), 10.0);

  assertFalse(floatVal1 == floatVal2);

  floatVal3.setValue(10.0);
  assertTrue(floatVal1 == floatVal3);
  
  
  floatVal2 = floatVal1;
  assertTrue(floatVal1 == floatVal2);

  floatVal1.setValue(20.0);
  assertEqual(floatVal1.getValue(), 20.0);
  assertFalse(floatVal1 == floatVal2);

  assertEqual(floatVal1 + floatVal2, 30.0);

  assertEqual(floatVal1 - floatVal2, 10.0);
 
  assertEqual(floatVal1 * floatVal2, 200.0);
  
  assertEqual(floatVal1 / floatVal2, 2.0);
}

test(float_persist)
{
  Value<float> floatVal1;
  assertFalse(floatVal1.hasChanged());
  
  floatVal1.setValue(10.0);
  assertTrue(floatVal1.hasChanged());

  floatVal1.persistValue();
  assertFalse(floatVal1.hasChanged());

  floatVal1.setValue(0.0);
  assertTrue(floatVal1.hasChanged());

  floatVal1.revertValue();
  assertEqual(floatVal1.getValue(), 10.0);
  assertFalse(floatVal1.hasChanged());

  floatVal1.initValue(20.0);
  assertEqual(floatVal1.getValue(), 20.0);
  assertFalse(floatVal1.hasChanged());
}

test(int_default_is_0)
{
