(AutomatedTests) Pushed line & function coverage of public API up 91/40091/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 28 May 2015 18:32:35 +0000 (19:32 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 28 May 2015 18:32:42 +0000 (19:32 +0100)
Change-Id: I01b33cf0d616e8c622745b1f9b2d165ee93df957

automated-tests/src/dali/utc-Dali-Constraints.cpp
automated-tests/src/dali/utc-Dali-LongPressGesture.cpp
automated-tests/src/dali/utc-Dali-PanGesture.cpp
automated-tests/src/dali/utc-Dali-PinchGesture.cpp
automated-tests/src/dali/utc-Dali-Pixel.cpp
automated-tests/src/dali/utc-Dali-TapGesture.cpp

index c11cac3..a3f9bb2 100644 (file)
@@ -396,3 +396,10 @@ int UtcDaliConstraintsLookAt(void)
   END_TEST;
 }
 ///////////////////////////////////////////////////////////////////////////////
+
+int UtcDaliPropertyInputGetExtension(void)
+{
+  PropertyInputImpl input( Property::BOOLEAN );
+  DALI_TEST_CHECK( input.GetExtension() == NULL );
+  END_TEST;
+}
index b047942..b870366 100644 (file)
@@ -70,3 +70,13 @@ int UtcDaliLongPressGestureAssignment(void)
   DALI_TEST_EQUALS(Gesture::Started, gesture2.state, TEST_LOCATION);
   END_TEST;
 }
+
+int UtcDaliLongPressGestureDynamicAllocation(void)
+{
+  LongPressGesture* gesture = new LongPressGesture( Gesture::Started );
+  DALI_TEST_EQUALS(1u, gesture->numberOfTouches, TEST_LOCATION);
+  DALI_TEST_EQUALS(Gesture::LongPress, gesture->type, TEST_LOCATION);
+  delete gesture;
+
+  END_TEST;
+}
index 814850f..b830f9d 100644 (file)
@@ -134,3 +134,14 @@ int UtcDaliPanGestureGetScreenDistance(void)
   DALI_TEST_EQUALS(50.0f, gesture.GetScreenDistance(), TEST_LOCATION);
   END_TEST;
 }
+
+int UtcDaliPanGestureDynamicAllocation(void)
+{
+  PanGesture* gesture = new PanGesture( Gesture::Started );
+  DALI_TEST_EQUALS(Gesture::Started, gesture->state, TEST_LOCATION);
+  DALI_TEST_EQUALS(1u, gesture->numberOfTouches, TEST_LOCATION);
+  DALI_TEST_EQUALS(Gesture::Pan, gesture->type, TEST_LOCATION);
+  delete gesture;
+
+  END_TEST;
+}
index 3ea45c2..3058f1f 100644 (file)
@@ -93,3 +93,15 @@ int UtcDaliPinchGestureAssignment(void)
   DALI_TEST_EQUALS(Gesture::Pinch, gesture.type, TEST_LOCATION);
   END_TEST;
 }
+
+int UtcDaliPinchGestureDynamicAllocation(void)
+{
+  PinchGesture* gesture = new PinchGesture( Gesture::Started );
+  DALI_TEST_EQUALS(Gesture::Started, gesture->state, TEST_LOCATION);
+  DALI_TEST_EQUALS(0.0f, gesture->scale, TEST_LOCATION);
+  DALI_TEST_EQUALS(0.0f, gesture->speed, TEST_LOCATION);
+  DALI_TEST_EQUALS(Gesture::Pinch, gesture->type, TEST_LOCATION);
+  delete gesture;
+
+  END_TEST;
+}
index bc2e9c8..78a3436 100644 (file)
@@ -83,6 +83,12 @@ int UtcDaliPixelHasAlpha(void)
   END_TEST;
 }
 
+int UtcDaliPixelHasAlphaN(void)
+{
+  DALI_TEST_EQUALS( Pixel::HasAlpha( Pixel::Format( 123123123123 ) ), false, TEST_LOCATION );
+  END_TEST;
+}
+
 int UtcDaliPixelGetBytesPerPixel(void)
 {
   TestApplication application;
@@ -114,6 +120,12 @@ int UtcDaliPixelGetBytesPerPixel(void)
   END_TEST;
 }
 
+int UtcDaliPixelGetBytesPerPixelN(void)
+{
+  DALI_TEST_EQUALS( Pixel::GetBytesPerPixel( Pixel::Format( 123123123123 ) ), 0u, TEST_LOCATION );
+  END_TEST;
+}
+
 int UtcDaliPixelGetAlphaOffsetAndMask(void)
 {
   TestApplication application;
@@ -182,3 +194,13 @@ int UtcDaliPixelGetAlphaOffsetAndMask(void)
   DALI_TEST_CHECK( byteOffset == 0 && bitMask == 0);
   END_TEST;
 }
+
+int UtcDaliPixelGetAlphaOffsetAndMaskN(void)
+{
+  int byteOffset = 200;
+  int bitMask = 200;
+  Pixel::GetAlphaOffsetAndMask( Pixel::Format( 123123123123 ), byteOffset, bitMask );
+  DALI_TEST_CHECK( byteOffset == 200 );
+  DALI_TEST_CHECK( bitMask == 200 );
+  END_TEST;
+}
index 8df2557..e53dcbb 100644 (file)
@@ -73,3 +73,14 @@ int UtcDaliTapGestureAssignment(void)
   DALI_TEST_EQUALS(Gesture::Tap, gesture2.type, TEST_LOCATION);
   END_TEST;
 }
+
+int UtcDaliTapGestureDynamicAllocation(void)
+{
+  TapGesture* gesture = new TapGesture;
+  DALI_TEST_EQUALS(1u, gesture->numberOfTouches, TEST_LOCATION);
+  DALI_TEST_EQUALS(1u, gesture->numberOfTaps, TEST_LOCATION);
+  DALI_TEST_EQUALS(Gesture::Tap, gesture->type, TEST_LOCATION);
+  delete gesture;
+
+  END_TEST;
+}