Saving a bit of memory by using pretty function instead of full file name 14/32414/3 accepted/tizen/common/20141222.090212 submit/tizen_common/20141218.164254
authorKimmo Hoikka <kimmo.hoikka@samsung.com>
Wed, 17 Dec 2014 19:13:16 +0000 (19:13 +0000)
committerKimmo Hoikka <kimmo.hoikka@samsung.com>
Thu, 18 Dec 2014 15:02:01 +0000 (15:02 +0000)
Change-Id: I5d0041855016083f3238b6155ef5a5efa4985531

32 files changed:
automated-tests/src/dali-toolkit-internal/utc-Dali-TextView-Relayout-Utilities.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-TextView.cpp
automated-tests/src/dali-toolkit-unmanaged/utc-Dali-BendyEffect.cpp
automated-tests/src/dali-toolkit-unmanaged/utc-Dali-BlindEffect.cpp
automated-tests/src/dali-toolkit-unmanaged/utc-Dali-BloomView.cpp
automated-tests/src/dali-toolkit-unmanaged/utc-Dali-CarouselEffect.cpp
automated-tests/src/dali-toolkit-unmanaged/utc-Dali-DisplacementEffect.cpp
automated-tests/src/dali-toolkit-unmanaged/utc-Dali-DistanceFieldEffect.cpp
automated-tests/src/dali-toolkit-unmanaged/utc-Dali-GaussianBlurView.cpp
automated-tests/src/dali-toolkit-unmanaged/utc-Dali-NavigationControl.cpp
automated-tests/src/dali-toolkit-unmanaged/utc-Dali-OverlayEffect.cpp
automated-tests/src/dali-toolkit-unmanaged/utc-Dali-ShadowView.cpp
automated-tests/src/dali-toolkit-unmanaged/utc-Dali-ShearEffect.cpp
automated-tests/src/dali-toolkit-unmanaged/utc-Dali-SpotEffect.cpp
automated-tests/src/dali-toolkit-unmanaged/utc-Dali-SquareDissolveEffect.cpp
automated-tests/src/dali-toolkit-unmanaged/utc-Dali-TableView.cpp
automated-tests/src/dali-toolkit-unmanaged/utc-Dali-ToolBar.cpp
automated-tests/src/dali-toolkit-unmanaged/utc-Dali-View.cpp
automated-tests/src/dali-toolkit-unmanaged/utc-Dali-WaterEffect.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.h
automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp
automated-tests/src/dali-toolkit/utc-Dali-BubbleEmitter.cpp
automated-tests/src/dali-toolkit/utc-Dali-DissolveEffect.cpp
automated-tests/src/dali-toolkit/utc-Dali-IrisEffect.cpp
automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp
automated-tests/src/dali-toolkit/utc-Dali-Ripple2DEffect.cpp
automated-tests/src/dali-toolkit/utc-Dali-RippleEffect.cpp
automated-tests/src/dali-toolkit/utc-Dali-SwirlEffect.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextView.cpp
base/dali-toolkit/internal/controls/alignment/alignment-impl.cpp
base/dali-toolkit/public-api/controls/alignment/alignment.h

index c556e08..3bf0a46 100644 (file)
@@ -801,8 +801,8 @@ int UtcDaliTextViewMiscelaneousAsserts(void)
   }
   catch( Dali::DaliException& e )
   {
   }
   catch( Dali::DaliException& e )
   {
-    tet_printf( "Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str() );
-    DALI_TEST_EQUALS( e.mCondition, "!\"TextViewRelayout::CalculateXoffset: Wrong horizontal text alignment. Did you set a vertical one?\"", TEST_LOCATION );
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS( e.condition, "!\"TextViewRelayout::CalculateXoffset: Wrong horizontal text alignment. Did you set a vertical one?\"", TEST_LOCATION );
     assert1 = true;
   }
   catch( ... )
     assert1 = true;
   }
   catch( ... )
@@ -817,8 +817,8 @@ int UtcDaliTextViewMiscelaneousAsserts(void)
   }
   catch( Dali::DaliException& e )
   {
   }
   catch( Dali::DaliException& e )
   {
-    tet_printf( "Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str() );
-    DALI_TEST_EQUALS( e.mCondition, "!\"TextViewRelayout::CalculateXoffset: Wrong vertical text alignment. Did you set an horizontal one?\"", TEST_LOCATION );
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS( e.condition, "!\"TextViewRelayout::CalculateXoffset: Wrong vertical text alignment. Did you set an horizontal one?\"", TEST_LOCATION );
     assert2 = true;
   }
   catch( ... )
     assert2 = true;
   }
   catch( ... )
index dc2a363..91dcc57 100644 (file)
@@ -1817,8 +1817,8 @@ int UtcDaliTextViewMergeWord02(void)
   }
   catch( Dali::DaliException& e )
   {
   }
   catch( Dali::DaliException& e )
   {
-    tet_printf( "Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str() );
-    DALI_TEST_EQUALS( e.mCondition, "!\"TextViewProcessor::MergeWord(). ERROR: White spaces or new paragraph characters can't be merged with other words.\"", TEST_LOCATION );
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS( e.condition, "!\"TextViewProcessor::MergeWord(). ERROR: White spaces or new paragraph characters can't be merged with other words.\"", TEST_LOCATION );
     assert1 = true;
   }
   try
     assert1 = true;
   }
   try
@@ -1828,8 +1828,8 @@ int UtcDaliTextViewMergeWord02(void)
   }
   catch( Dali::DaliException& e )
   {
   }
   catch( Dali::DaliException& e )
   {
-    tet_printf( "Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str() );
-    DALI_TEST_EQUALS( e.mCondition, "!\"TextViewProcessor::MergeWord(). ERROR: White spaces or new paragraph characters can't be merged with other words.\"", TEST_LOCATION );
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS( e.condition, "!\"TextViewProcessor::MergeWord(). ERROR: White spaces or new paragraph characters can't be merged with other words.\"", TEST_LOCATION );
     assert2 = true;
   }
   try
     assert2 = true;
   }
   try
@@ -1839,8 +1839,8 @@ int UtcDaliTextViewMergeWord02(void)
   }
   catch( Dali::DaliException& e )
   {
   }
   catch( Dali::DaliException& e )
   {
-    tet_printf( "Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str() );
-    DALI_TEST_EQUALS( e.mCondition, "!\"TextViewProcessor::MergeWord(). ERROR: White spaces or new paragraph characters can't be merged with other words.\"", TEST_LOCATION );
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS( e.condition, "!\"TextViewProcessor::MergeWord(). ERROR: White spaces or new paragraph characters can't be merged with other words.\"", TEST_LOCATION );
     assert3 = true;
   }
   try
     assert3 = true;
   }
   try
@@ -1850,8 +1850,8 @@ int UtcDaliTextViewMergeWord02(void)
   }
   catch( Dali::DaliException& e )
   {
   }
   catch( Dali::DaliException& e )
   {
-    tet_printf( "Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str() );
-    DALI_TEST_EQUALS( e.mCondition, "!\"TextViewProcessor::MergeWord(). ERROR: White spaces or new paragraph characters can't be merged with other words.\"", TEST_LOCATION );
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS( e.condition, "!\"TextViewProcessor::MergeWord(). ERROR: White spaces or new paragraph characters can't be merged with other words.\"", TEST_LOCATION );
     assert4 = true;
   }
   try
     assert4 = true;
   }
   try
@@ -1861,8 +1861,8 @@ int UtcDaliTextViewMergeWord02(void)
   }
   catch( Dali::DaliException& e )
   {
   }
   catch( Dali::DaliException& e )
   {
-    tet_printf( "Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str() );
-    DALI_TEST_EQUALS( e.mCondition, "!\"TextViewProcessor::MergeWord(). ERROR: White spaces or new paragraph characters can't be merged with other words.\"", TEST_LOCATION );
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS( e.condition, "!\"TextViewProcessor::MergeWord(). ERROR: White spaces or new paragraph characters can't be merged with other words.\"", TEST_LOCATION );
     assert5 = true;
   }
   try
     assert5 = true;
   }
   try
@@ -1872,8 +1872,8 @@ int UtcDaliTextViewMergeWord02(void)
   }
   catch( Dali::DaliException& e )
   {
   }
   catch( Dali::DaliException& e )
   {
-    tet_printf( "Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str() );
-    DALI_TEST_EQUALS( e.mCondition, "!\"TextViewProcessor::MergeWord(). ERROR: White spaces or new paragraph characters can't be merged with other words.\"", TEST_LOCATION );
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS( e.condition, "!\"TextViewProcessor::MergeWord(). ERROR: White spaces or new paragraph characters can't be merged with other words.\"", TEST_LOCATION );
     assert6 = true;
   }
 
     assert6 = true;
   }
 
@@ -1998,8 +1998,8 @@ int UtcDaliTextViewMergeParagraph02(void)
   }
   catch( Dali::DaliException& e )
   {
   }
   catch( Dali::DaliException& e )
   {
-    tet_printf( "Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str() );
-    DALI_TEST_EQUALS( e.mCondition, "!\"TextViewProcessor::MergeParagraph(). ERROR: A paragraph can't be merged to another paragraph which finishes with a new paragraph character.\"", TEST_LOCATION );
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS( e.condition, "!\"TextViewProcessor::MergeParagraph(). ERROR: A paragraph can't be merged to another paragraph which finishes with a new paragraph character.\"", TEST_LOCATION );
     assert1 = true;
   }
 
     assert1 = true;
   }
 
index 27161c6..a785f6f 100644 (file)
@@ -50,7 +50,7 @@ int UtcDaliBendyUninitializedEffect(void)
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
+    DALI_TEST_PRINT_ASSERT( e );
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
index b350e4c..c19f7be 100644 (file)
@@ -51,7 +51,7 @@ int UtcDaliBlindEffectUninitialized(void)
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
+    DALI_TEST_PRINT_ASSERT( e );
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
index f29bbfa..c6305e8 100644 (file)
@@ -52,7 +52,7 @@ int UtcDaliBloomViewUninitialized(void)
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
+    DALI_TEST_PRINT_ASSERT( e );
     DALI_TEST_CHECK(!view);
   }
   END_TEST;
     DALI_TEST_CHECK(!view);
   }
   END_TEST;
index 6d0c4ec..07e3c9f 100644 (file)
@@ -49,7 +49,7 @@ int UtcDaliCarouselEffectUninitialized(void)
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
+    DALI_TEST_PRINT_ASSERT( e );
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
index 6aa26a3..32aa471 100644 (file)
@@ -56,7 +56,7 @@ int UtcDaliDisplacementEffectUninitialized(void)
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
+    DALI_TEST_PRINT_ASSERT( e );
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
index d37bf3e..e0e5109 100644 (file)
@@ -71,7 +71,7 @@ int UtcDaliDistanceFieldEffectUninitialized(void)
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
+    DALI_TEST_PRINT_ASSERT( e );
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
index 80d1fbf..d4b6e4a 100644 (file)
@@ -58,7 +58,7 @@ int UtcDaliGaussianBlurViewUninitialized(void)
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
+    DALI_TEST_PRINT_ASSERT( e );
     DALI_TEST_CHECK(!view);
   }
   END_TEST;
     DALI_TEST_CHECK(!view);
   }
   END_TEST;
index e3ea205..a2c7d54 100644 (file)
@@ -272,8 +272,8 @@ int UtcDaliNavigationControlSetBackground(void)
   }
   catch (Dali::DaliException& e)
   {
   }
   catch (Dali::DaliException& e)
   {
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
-    DALI_TEST_EQUALS(e.mCondition, "segmentIndex+1 < mKnots.size() && segmentIndex < mKnots.size()", TEST_LOCATION);
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS(e.condition, "segmentIndex+1 < mKnots.size() && segmentIndex < mKnots.size()", TEST_LOCATION);
     tet_result(TET_FAIL);
   }
 
     tet_result(TET_FAIL);
   }
 
index 49e3a41..8c0ad1b 100644 (file)
@@ -72,7 +72,7 @@ int UtcDaliOverlayUninitializedEffect(void)
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
+    DALI_TEST_PRINT_ASSERT( e );
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
index 5ed410f..edc71f3 100644 (file)
@@ -51,7 +51,7 @@ int UtcDaliShadowViewUninitialized(void)
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
+    DALI_TEST_PRINT_ASSERT( e );
     DALI_TEST_CHECK(!view);
   }
   END_TEST;
     DALI_TEST_CHECK(!view);
   }
   END_TEST;
index 5feb044..2a0c0bd 100644 (file)
@@ -47,7 +47,7 @@ int UtcDaliShearEffectUninitialized(void)
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
+    DALI_TEST_PRINT_ASSERT( e );
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
index 4fe9f4f..95866cd 100644 (file)
@@ -49,7 +49,7 @@ int UtcDaliSpotUninitializedEffect(void)
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
+    DALI_TEST_PRINT_ASSERT( e );
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
index c394490..b25316e 100644 (file)
@@ -49,7 +49,7 @@ int UtcDaliSquareDissolveEffectUninitialized(void)
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
+    DALI_TEST_PRINT_ASSERT( e );
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
index fe75b1d..7fe943a 100644 (file)
@@ -432,10 +432,10 @@ int UtcDaliTableViewChildAssert(void)
     // should assert
     tet_result(TET_FAIL);
   }
     // should assert
     tet_result(TET_FAIL);
   }
-  catch( Dali::DaliException &e )
+  catch( Dali::DaliExceptione )
   {
   {
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
-    DALI_TEST_EQUALS(e.mCondition, "child", TEST_LOCATION);
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS(e.condition, "child", TEST_LOCATION);
   }
   END_TEST;
 }
   }
   END_TEST;
 }
@@ -457,10 +457,10 @@ int UtcDaliTableViewMetricsAssert(void)
 
     tet_result(TET_FAIL);
   }
 
     tet_result(TET_FAIL);
   }
-  catch( Dali::DaliException &e)
+  catch( Dali::DaliException& e )
   {
   {
-    tet_printf("1. Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
-    DALI_TEST_EQUALS(e.mCondition, "rowIndex < mFixedHeights.size()", TEST_LOCATION);
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS(e.condition, "rowIndex < mFixedHeights.size()", TEST_LOCATION);
   }
 
   try
   }
 
   try
@@ -469,10 +469,10 @@ int UtcDaliTableViewMetricsAssert(void)
 
     tet_result(TET_FAIL);
   }
 
     tet_result(TET_FAIL);
   }
-  catch( Dali::DaliException &e)
+  catch( Dali::DaliException& e )
   {
   {
-    tet_printf("2. Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
-    DALI_TEST_EQUALS(e.mCondition, "rowIndex < mFixedHeights.size()", TEST_LOCATION);
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS(e.condition, "rowIndex < mFixedHeights.size()", TEST_LOCATION);
   }
 
   try
   }
 
   try
@@ -481,10 +481,10 @@ int UtcDaliTableViewMetricsAssert(void)
 
     tet_result(TET_FAIL);
   }
 
     tet_result(TET_FAIL);
   }
-  catch( Dali::DaliException &e)
+  catch( Dali::DaliException& e )
   {
   {
-    tet_printf("3. Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
-    DALI_TEST_EQUALS(e.mCondition, "columnIndex < mFixedWidths.size()", TEST_LOCATION);
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS(e.condition, "columnIndex < mFixedWidths.size()", TEST_LOCATION);
   }
 
   try
   }
 
   try
@@ -493,10 +493,10 @@ int UtcDaliTableViewMetricsAssert(void)
 
     tet_result(TET_FAIL);
   }
 
     tet_result(TET_FAIL);
   }
-  catch( Dali::DaliException &e)
+  catch( Dali::DaliException& e )
   {
   {
-    tet_printf("4. Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
-    DALI_TEST_EQUALS(e.mCondition, "columnIndex < mFixedWidths.size()", TEST_LOCATION);
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS(e.condition, "columnIndex < mFixedWidths.size()", TEST_LOCATION);
   }
 
   // relatives...
   }
 
   // relatives...
@@ -507,10 +507,10 @@ int UtcDaliTableViewMetricsAssert(void)
 
     tet_result(TET_FAIL);
   }
 
     tet_result(TET_FAIL);
   }
-  catch( Dali::DaliException &e)
+  catch( Dali::DaliException& e )
   {
   {
-    tet_printf("5. Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
-    DALI_TEST_EQUALS(e.mCondition, "rowIndex < mRelativeHeights.size()", TEST_LOCATION);
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS(e.condition, "rowIndex < mRelativeHeights.size()", TEST_LOCATION);
   }
 
   try
   }
 
   try
@@ -519,10 +519,10 @@ int UtcDaliTableViewMetricsAssert(void)
 
     tet_result(TET_FAIL);
   }
 
     tet_result(TET_FAIL);
   }
-  catch( Dali::DaliException &e)
+  catch( Dali::DaliException& e )
   {
   {
-    tet_printf("6. Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
-    DALI_TEST_EQUALS(e.mCondition, "rowIndex < mRelativeHeights.size()", TEST_LOCATION);
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS(e.condition, "rowIndex < mRelativeHeights.size()", TEST_LOCATION);
   }
 
   try
   }
 
   try
@@ -531,10 +531,10 @@ int UtcDaliTableViewMetricsAssert(void)
 
     tet_result(TET_FAIL);
   }
 
     tet_result(TET_FAIL);
   }
-  catch( Dali::DaliException &e)
+  catch( Dali::DaliException& e )
   {
   {
-    tet_printf("7. Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
-    DALI_TEST_EQUALS(e.mCondition, "columnIndex < mRelativeWidths.size()", TEST_LOCATION);
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS(e.condition, "columnIndex < mRelativeWidths.size()", TEST_LOCATION);
   }
 
   try
   }
 
   try
@@ -543,10 +543,10 @@ int UtcDaliTableViewMetricsAssert(void)
 
     tet_result(TET_FAIL);
   }
 
     tet_result(TET_FAIL);
   }
-  catch( Dali::DaliException &e)
+  catch( Dali::DaliException& e )
   {
   {
-    tet_printf("8. Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
-    DALI_TEST_EQUALS(e.mCondition, "columnIndex < mRelativeWidths.size()", TEST_LOCATION);
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS(e.condition, "columnIndex < mRelativeWidths.size()", TEST_LOCATION);
   }
   END_TEST;
 }
   }
   END_TEST;
 }
index fc1cafb..4b03c11 100644 (file)
@@ -237,8 +237,8 @@ int UtcDaliToolBarRemoveControl02(void)
   }
   catch( Dali::DaliException& e )
   {
   }
   catch( Dali::DaliException& e )
   {
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
-    DALI_TEST_EQUALS(e.mCondition, "false", TEST_LOCATION);
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS(e.condition, "false", TEST_LOCATION);
   }
   catch( ... )
   {
   }
   catch( ... )
   {
index f9fc731..21a57df 100644 (file)
@@ -189,8 +189,8 @@ int UtcDaliViewAddGetRemoveContentLayer02(void)
   }
   catch( DaliException& e )
   {
   }
   catch( DaliException& e )
   {
-    tet_printf("Assertion %s failed at %s when an unitialized layer is added.\n", e.mCondition.c_str(), e.mLocation.c_str());
-    DALI_TEST_EQUALS( e.mCondition, "layer", TEST_LOCATION );
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS( e.condition, "layer", TEST_LOCATION );
   }
 
   // Test: get a layer which was not added before.
   }
 
   // Test: get a layer which was not added before.
@@ -262,8 +262,8 @@ int UtcDaliViewSetGetBackgroundLayer02(void)
   }
   catch( DaliException& e )
   {
   }
   catch( DaliException& e )
   {
-    tet_printf("Assertion %s failed at %s when trying to add background to the view and the view is not on the stage.\n", e.mCondition.c_str(), e.mLocation.c_str());
-    DALI_TEST_EQUALS( e.mCondition, "mBackgroundLayer.OnStage()", TEST_LOCATION );
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS( e.condition, "mBackgroundLayer.OnStage()", TEST_LOCATION );
     assert = true;
   }
 
     assert = true;
   }
 
index 2aca9b4..2f41d9c 100644 (file)
@@ -49,7 +49,7 @@ int UtcDaliWaterEffectUninitialized(void)
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
+    DALI_TEST_PRINT_ASSERT( e );
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
@@ -86,7 +86,7 @@ int UtcDaliWaterEffectOutOfBounds(void)
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
+    DALI_TEST_PRINT_ASSERT( e );
     DALI_TEST_CHECK( true );
   }
   END_TEST;
     DALI_TEST_CHECK( true );
   }
   END_TEST;
@@ -217,12 +217,9 @@ int UtcDaliWaterEffectGetAmplitudeNegative(void)
     effect.GetAmplitude(9999);
     tet_result(TET_FAIL);
   }
     effect.GetAmplitude(9999);
     tet_result(TET_FAIL);
   }
-  catch(DaliException& exception)
+  catch(DaliException& e)
   {
   {
-    if (exception.mCondition == "index < mNumberOfWaves")
-    {
-      tet_result(TET_PASS);
-    }
+    DALI_TEST_ASSERT(e, "index < mNumberOfWaves", TEST_LOCATION );
   }
   END_TEST;
 }
   }
   END_TEST;
 }
@@ -271,12 +268,9 @@ int UtcDaliWaterEffectGetCenterNegative(void)
     effect.GetCenter(9999);
     tet_result(TET_FAIL);
   }
     effect.GetCenter(9999);
     tet_result(TET_FAIL);
   }
-  catch(DaliException& exception)
+  catch(DaliException& e)
   {
   {
-    if (exception.mCondition == "index < mNumberOfWaves")
-    {
-      tet_result(TET_PASS);
-    }
+    DALI_TEST_ASSERT(e, "index < mNumberOfWaves", TEST_LOCATION );
   }
   END_TEST;
 }
   }
   END_TEST;
 }
@@ -325,12 +319,9 @@ int UtcDaliWaterEffectGetPropagationNegative(void)
     effect.GetPropagation(9999);
     tet_result(TET_FAIL);
   }
     effect.GetPropagation(9999);
     tet_result(TET_FAIL);
   }
-  catch(DaliException& exception)
+  catch(DaliException& e)
   {
   {
-    if (exception.mCondition == "index < mNumberOfWaves")
-    {
-      tet_result(TET_PASS);
-    }
+    DALI_TEST_ASSERT(e, "index < mNumberOfWaves", TEST_LOCATION );
   }
   END_TEST;
 }
   }
   END_TEST;
 }
index 4c847d1..8ceaed3 100644 (file)
@@ -268,25 +268,11 @@ void DALI_TEST_GREATER( float value1, float value2, const char* location)
   }
 }
 
   }
 }
 
-/**
- * Test whether the assertion condition that failed and thus triggered the
- * exception \b e contained a given substring at the start of its literal text.
- * @param[in] e The exception that we expect was fired by a runtime assertion
- *              failure.
- * @param[in] conditionSubString The text that we expect to be present in an
- *                               assertion which triggered the exception.
- * @param[in] location The TEST_LOCATION macro should be used here.
- *
- * @remark **Side-effects:** The result of the tet test is set to TET_PASS if
- *         the substring is at the start of the exception's condition and
- *         TET_FAIL if it isn't. Note, if the result of a test is set multiple
- *         times, a TET_FAIL will override any number of TET_PASSes.
- */
 void DALI_TEST_ASSERT( DaliException& e, std::string conditionSubString, const char* location )
 {
 void DALI_TEST_ASSERT( DaliException& e, std::string conditionSubString, const char* location )
 {
-  if( 0u != e.mCondition.find( conditionSubString ))
+  if( NULL == strstr( e.condition, conditionSubString.c_str() ) )
   {
   {
-    fprintf(stderr, "Assertion %s failed at %s\n", conditionSubString.c_str(), location);
+    fprintf(stderr, "Expected substring '%s' : actual exception string '%s' : location %s\n", conditionSubString.c_str(), e.condition, location );
     tet_result(TET_FAIL);
   }
   else
     tet_result(TET_FAIL);
   }
   else
@@ -295,14 +281,6 @@ void DALI_TEST_ASSERT( DaliException& e, std::string conditionSubString, const c
   }
 }
 
   }
 }
 
-/** Self-documenting wrapper for DALI_TEST_ASSERT.
- * @copydoc DALI_TEST_ASSERT()
- */
-void DALI_TEST_ASSERT_CONDITION_STARTS_WITH_SUBSTRING( DaliException& exceptionFromAssertion, std::string conditionSubString, const char* location )
-{
-  DALI_TEST_ASSERT(exceptionFromAssertion, conditionSubString, location);
-}
-
 // Functor to test whether an Applied signal is emitted
 ConstraintAppliedCheck::ConstraintAppliedCheck( bool& signalReceived )
 : mSignalReceived( signalReceived )
 // Functor to test whether an Applied signal is emitted
 ConstraintAppliedCheck::ConstraintAppliedCheck( bool& signalReceived )
 : mSignalReceived( signalReceived )
index 571dde4..473a029 100644 (file)
@@ -350,25 +350,22 @@ void DALI_TEST_GREATER( float value1, float value2, const char* location);
 
 /**
  * Test whether the assertion condition that failed and thus triggered the
 
 /**
  * Test whether the assertion condition that failed and thus triggered the
- * exception \b e contained a given substring at the start of its literal text.
- * @param[in] e The exception that we expect was fired by a runtime assertion
- *              failure.
+ * exception \b e contained a given substring.
+ * @param[in] e The exception that we expect was fired by a runtime assertion failure.
  * @param[in] conditionSubString The text that we expect to be present in an
  *                               assertion which triggered the exception.
  * @param[in] location The TEST_LOCATION macro should be used here.
  * @param[in] conditionSubString The text that we expect to be present in an
  *                               assertion which triggered the exception.
  * @param[in] location The TEST_LOCATION macro should be used here.
- *
- * @remark **Side-effects:** The result of the tet test is set to TET_PASS if
- *         the substring is at the start of the exception's condition and
- *         TET_FAIL if it isn't. Note, if the result of a test is set multiple
- *         times, a TET_FAIL will override any number of TET_PASSes.
  */
 void DALI_TEST_ASSERT( DaliException& e, std::string conditionSubString, const char* location );
 
  */
 void DALI_TEST_ASSERT( DaliException& e, std::string conditionSubString, const char* location );
 
-/** Self-documenting wrapper for DALI_TEST_ASSERT.
- * @copydoc DALI_TEST_ASSERT()
+/**
+ * Print the assert
+ * @param[in] e The exception that we expect was fired by a runtime assertion failure.
  */
  */
-void DALI_TEST_ASSERT_CONDITION_STARTS_WITH_SUBSTRING( DaliException& exceptionFromAssertion, std::string conditionSubString, const char* location );
-
+inline void DALI_TEST_PRINT_ASSERT( DaliException& e )
+{
+  tet_printf("Assertion %s failed at %s\n", e.condition, e.location );
+}
 
 // Functor to test whether an Applied signal is emitted
 struct ConstraintAppliedCheck
 
 // Functor to test whether an Applied signal is emitted
 struct ConstraintAppliedCheck
index 879dbb3..6d3fa86 100644 (file)
@@ -63,12 +63,9 @@ int UtcDaliAlignmentConstructorNegative(void)
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
-  catch (DaliException& exception)
+  catch (DaliException& e)
   {
   {
-    if (exception.mCondition == "alignment")
-    {
-      tet_result(TET_PASS);
-    }
+    DALI_TEST_ASSERT(e, "alignment", TEST_LOCATION );
   }
   END_TEST;
 }
   }
   END_TEST;
 }
@@ -422,19 +419,10 @@ int UtcDaliAlignmentSetAlignmentTypeNegative(void)
   {
     Alignment alignment = Alignment::New();
     Alignment::Type type(Alignment::Type(Alignment::HorizontalLeft | Alignment::HorizontalCenter));
   {
     Alignment alignment = Alignment::New();
     Alignment::Type type(Alignment::Type(Alignment::HorizontalLeft | Alignment::HorizontalCenter));
-
-    try
-    {
-      alignment.SetAlignmentType(type);
-      tet_result(TET_FAIL);
-    }
-    catch (DaliException& exception)
-    {
-      if (exception.mCondition == "!horizontalSet")
-      {
-        tet_result(TET_PASS);
-      }
-    }
+    alignment.SetAlignmentType(type);
+    // center will prevail in conflict
+    DALI_TEST_CHECK( Alignment::HorizontalCenter & alignment.GetAlignmentType() );
+    DALI_TEST_CHECK( !(Alignment::HorizontalLeft & alignment.GetAlignmentType()) );
   }
 
   // Setting HorizontalCenter, HorizontalRight
   }
 
   // Setting HorizontalCenter, HorizontalRight
@@ -442,56 +430,30 @@ int UtcDaliAlignmentSetAlignmentTypeNegative(void)
     Alignment alignment = Alignment::New();
     Alignment::Type type(Alignment::Type(Alignment::HorizontalCenter | Alignment::HorizontalRight));
 
     Alignment alignment = Alignment::New();
     Alignment::Type type(Alignment::Type(Alignment::HorizontalCenter | Alignment::HorizontalRight));
 
-    try
-    {
-      alignment.SetAlignmentType(type);
-      tet_result(TET_FAIL);
-    }
-    catch (DaliException& exception)
-    {
-      if (exception.mCondition == "!horizontalSet")
-      {
-        tet_result(TET_PASS);
-      }
-    }
+    alignment.SetAlignmentType(type);
+    // center will prevail in conflict
+    DALI_TEST_CHECK( Alignment::HorizontalCenter & alignment.GetAlignmentType() );
+    DALI_TEST_CHECK( !(Alignment::HorizontalRight & alignment.GetAlignmentType()) );
   }
 
   // Setting VerticalTop, VerticalCenter
   {
     Alignment alignment = Alignment::New();
     Alignment::Type type(Alignment::Type(Alignment::VerticalTop | Alignment::VerticalCenter));
   }
 
   // Setting VerticalTop, VerticalCenter
   {
     Alignment alignment = Alignment::New();
     Alignment::Type type(Alignment::Type(Alignment::VerticalTop | Alignment::VerticalCenter));
-
-    try
-    {
-      alignment.SetAlignmentType(type);
-      tet_result(TET_FAIL);
-    }
-    catch (DaliException& exception)
-    {
-      if (exception.mCondition == "!verticalSet")
-      {
-        tet_result(TET_PASS);
-      }
-    }
+    alignment.SetAlignmentType(type);
+    // center will prevail in conflict
+    DALI_TEST_CHECK( Alignment::VerticalCenter & alignment.GetAlignmentType() );
+    DALI_TEST_CHECK( !(Alignment::VerticalTop & alignment.GetAlignmentType()) );
   }
 
   // Setting VerticalCenter, VerticalBottom
   {
     Alignment alignment = Alignment::New();
     Alignment::Type type(Alignment::Type(Alignment::VerticalTop | Alignment::VerticalBottom));
   }
 
   // Setting VerticalCenter, VerticalBottom
   {
     Alignment alignment = Alignment::New();
     Alignment::Type type(Alignment::Type(Alignment::VerticalTop | Alignment::VerticalBottom));
-
-    try
-    {
-      alignment.SetAlignmentType(type);
-      tet_result(TET_FAIL);
-    }
-    catch (DaliException& exception)
-    {
-      if (exception.mCondition == "!veritcalSet")
-      {
-        tet_result(TET_PASS);
-      }
-    }
+    alignment.SetAlignmentType(type);
+    // top will prevail in conflict
+    DALI_TEST_CHECK( Alignment::VerticalTop & alignment.GetAlignmentType() );
+    DALI_TEST_CHECK( !(Alignment::VerticalBottom & alignment.GetAlignmentType()) );
   }
   END_TEST;
 }
   }
   END_TEST;
 }
@@ -874,12 +836,9 @@ int UtcDaliAlignmentSetPaddingNegative(void)
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
-  catch (DaliException& exception)
+  catch (DaliException& e)
   {
   {
-    if (exception.mCondition == "( padding.left >= 0.f ) && ( padding.top >= 0.f ) && ( padding.right >= 0.f ) && ( padding.bottom >= 0.f )")
-    {
-      tet_result(TET_PASS);
-    }
+    DALI_TEST_ASSERT(e, "( padding.left >= 0.f ) && ( padding.top >= 0.f ) && ( padding.right >= 0.f ) && ( padding.bottom >= 0.f )", TEST_LOCATION );
   }
 
   try
   }
 
   try
@@ -888,12 +847,9 @@ int UtcDaliAlignmentSetPaddingNegative(void)
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
-  catch (DaliException& exception)
+  catch (DaliException& e)
   {
   {
-    if (exception.mCondition == "( padding.left >= 0.f ) && ( padding.top >= 0.f ) && ( padding.right >= 0.f ) && ( padding.bottom >= 0.f )")
-    {
-      tet_result(TET_PASS);
-    }
+    DALI_TEST_ASSERT(e, "( padding.left >= 0.f ) && ( padding.top >= 0.f ) && ( padding.right >= 0.f ) && ( padding.bottom >= 0.f )", TEST_LOCATION );
   }
 
   try
   }
 
   try
@@ -902,12 +858,9 @@ int UtcDaliAlignmentSetPaddingNegative(void)
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
-  catch (DaliException& exception)
+  catch (DaliException& e)
   {
   {
-    if (exception.mCondition == "( padding.left >= 0.f ) && ( padding.top >= 0.f ) && ( padding.right >= 0.f ) && ( padding.bottom >= 0.f )")
-    {
-      tet_result(TET_PASS);
-    }
+    DALI_TEST_ASSERT(e, "( padding.left >= 0.f ) && ( padding.top >= 0.f ) && ( padding.right >= 0.f ) && ( padding.bottom >= 0.f )", TEST_LOCATION );
   }
 
   try
   }
 
   try
@@ -916,12 +869,9 @@ int UtcDaliAlignmentSetPaddingNegative(void)
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
-  catch (DaliException& exception)
+  catch (DaliException& e)
   {
   {
-    if (exception.mCondition == "( padding.left >= 0.f ) && ( padding.top >= 0.f ) && ( padding.right >= 0.f ) && ( padding.bottom >= 0.f )")
-    {
-      tet_result(TET_PASS);
-    }
+    DALI_TEST_ASSERT(e, "( padding.left >= 0.f ) && ( padding.top >= 0.f ) && ( padding.right >= 0.f ) && ( padding.bottom >= 0.f )", TEST_LOCATION );
   }
   END_TEST;
 }
   }
   END_TEST;
 }
index 7a15412..187f990 100644 (file)
@@ -241,7 +241,7 @@ int UtcDaliBubbleEmitterSetBubbleDensity01(void)
   }
   catch(Dali::DaliException& e)
   {
   }
   catch(Dali::DaliException& e)
   {
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
+    DALI_TEST_PRINT_ASSERT( e );
     DALI_TEST_ASSERT(e, "density>0 && density<=9", TEST_LOCATION );
   }
   END_TEST;
     DALI_TEST_ASSERT(e, "density>0 && density<=9", TEST_LOCATION );
   }
   END_TEST;
@@ -261,7 +261,7 @@ int UtcDaliBubbleEmitterSetBubbleDensity02(void)
   }
   catch(Dali::DaliException& e)
   {
   }
   catch(Dali::DaliException& e)
   {
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
+    DALI_TEST_PRINT_ASSERT( e );
     DALI_TEST_ASSERT(e, "density>0 && density<=9", TEST_LOCATION );
   }
   END_TEST;
     DALI_TEST_ASSERT(e, "density>0 && density<=9", TEST_LOCATION );
   }
   END_TEST;
index befc3b2..87cb936 100644 (file)
@@ -54,7 +54,7 @@ int UtcDaliDissolveUninitializedEffect(void)
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
+    DALI_TEST_PRINT_ASSERT( e );
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
index 1567618..7fdc669 100644 (file)
@@ -53,7 +53,7 @@ int UtcDaliIrisEffectUninitialized(void)
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
+    DALI_TEST_PRINT_ASSERT( e );
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
index 79c39d7..aeef8a9 100644 (file)
@@ -251,8 +251,8 @@ int UtcDaliPushButtonSetGetAutorepeatingDelayValues02(void)
   }
   catch( Dali::DaliException& e )
   {
   }
   catch( Dali::DaliException& e )
   {
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
-    DALI_TEST_EQUALS(e.mCondition, "initialAutoRepeatingDelay > 0.f", TEST_LOCATION);
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS(e.condition, "initialAutoRepeatingDelay > 0.f", TEST_LOCATION);
     assert1 = true;
   }
 
     assert1 = true;
   }
 
@@ -262,8 +262,8 @@ int UtcDaliPushButtonSetGetAutorepeatingDelayValues02(void)
   }
   catch( Dali::DaliException& e )
   {
   }
   catch( Dali::DaliException& e )
   {
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
-    DALI_TEST_EQUALS(e.mCondition, "nextAutoRepeatingDelay > 0.f", TEST_LOCATION);
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS(e.condition, "nextAutoRepeatingDelay > 0.f", TEST_LOCATION);
     assert2 = true;
   }
 
     assert2 = true;
   }
 
index 55d9c28..1c6d9f2 100644 (file)
@@ -53,7 +53,7 @@ int UtcDaliRipple2DEffectUninitialized(void)
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
+    DALI_TEST_PRINT_ASSERT( e );
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
index 32f162b..5b0e423 100644 (file)
@@ -53,7 +53,7 @@ int UtcDaliRippleUninitializedEffect(void)
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
+    DALI_TEST_PRINT_ASSERT( e );
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
index 41436d6..75e7058 100644 (file)
@@ -53,7 +53,7 @@ int UtcDaliSwirlUninitializedEffect(void)
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
   catch (Dali::DaliException& e)
   {
     // Tests that a negative test of an assertion succeeds
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
+    DALI_TEST_PRINT_ASSERT( e );
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
     DALI_TEST_CHECK(!effect);
   }
   END_TEST;
index 5569d96..cb3f34a 100644 (file)
@@ -450,7 +450,7 @@ int UtcDaliTextViewSetAndGetHeightExceedPolicy(void)
             }
             catch( Dali::DaliException& e )
             {
             }
             catch( Dali::DaliException& e )
             {
-              DALI_TEST_EQUALS( e.mCondition, "!\"TextView::CombineExceedPolicies() Invalid width and height exceed policies combination\"", TEST_LOCATION );
+              DALI_TEST_EQUALS( e.condition, "!\"TextView::CombineExceedPolicies() Invalid width and height exceed policies combination\"", TEST_LOCATION );
             }
             catch( ... )
             {
             }
             catch( ... )
             {
index 48ae00e..bd8dc04 100644 (file)
@@ -393,43 +393,31 @@ Toolkit::Alignment Alignment::New( Toolkit::Alignment::Type horizontal, Toolkit:
 void Alignment::SetAlignmentType( Toolkit::Alignment::Type type )
 {
   // Horizontal Alignment
 void Alignment::SetAlignmentType( Toolkit::Alignment::Type type )
 {
   // Horizontal Alignment
-  bool horizontalSet(false);
-
+  if( type & Toolkit::Alignment::HorizontalRight )
+  {
+    mHorizontal = Toolkit::Alignment::HorizontalRight;
+  }
   if( type & Toolkit::Alignment::HorizontalLeft )
   {
     mHorizontal = Toolkit::Alignment::HorizontalLeft;
   if( type & Toolkit::Alignment::HorizontalLeft )
   {
     mHorizontal = Toolkit::Alignment::HorizontalLeft;
-    horizontalSet = true;
   }
   if( type & Toolkit::Alignment::HorizontalCenter )
   {
   }
   if( type & Toolkit::Alignment::HorizontalCenter )
   {
-    DALI_ASSERT_ALWAYS(!horizontalSet);
     mHorizontal = Toolkit::Alignment::HorizontalCenter;
     mHorizontal = Toolkit::Alignment::HorizontalCenter;
-    horizontalSet = true;
-  }
-  if( type & Toolkit::Alignment::HorizontalRight )
-  {
-    DALI_ASSERT_ALWAYS(!horizontalSet);
-    mHorizontal = Toolkit::Alignment::HorizontalRight;
   }
 
   // Vertical Alignment
   }
 
   // Vertical Alignment
-  bool verticalSet(false);
-
+  if( type & Toolkit::Alignment::VerticalBottom )
+  {
+    mVertical = Toolkit::Alignment::VerticalBottom;
+  }
   if( type & Toolkit::Alignment::VerticalTop )
   {
     mVertical = Toolkit::Alignment::VerticalTop;
   if( type & Toolkit::Alignment::VerticalTop )
   {
     mVertical = Toolkit::Alignment::VerticalTop;
-    verticalSet = true;
   }
   if( type & Toolkit::Alignment::VerticalCenter )
   {
   }
   if( type & Toolkit::Alignment::VerticalCenter )
   {
-    DALI_ASSERT_ALWAYS(!verticalSet);
     mVertical = Toolkit::Alignment::VerticalCenter;
     mVertical = Toolkit::Alignment::VerticalCenter;
-    verticalSet = true;
-  }
-  if( type & Toolkit::Alignment::VerticalBottom )
-  {
-    DALI_ASSERT_ALWAYS(!verticalSet);
-    mVertical = Toolkit::Alignment::VerticalBottom;
   }
 
   RelayoutRequest();
   }
 
   RelayoutRequest();
index 80e3cea..42faf30 100644 (file)
@@ -151,6 +151,7 @@ public:
 
   /**
    * @brief Sets the new alignment. By default ( HorizontalCenter | VerticalCenter ).
 
   /**
    * @brief Sets the new alignment. By default ( HorizontalCenter | VerticalCenter ).
+   * Note! there should only be one horizontal and one vertical policy
    * @param [in] type The new alignment option.
    */
   void SetAlignmentType( Type type );
    * @param [in] type The new alignment option.
    */
   void SetAlignmentType( Type type );