From 58d8bbd7fc6e42ee919fd98c8eb1c58bc683ef1d Mon Sep 17 00:00:00 2001 From: Kimmo Hoikka Date: Tue, 16 Dec 2014 13:59:00 +0000 Subject: [PATCH] Saving a bit of memory by using pretty function instead of full file name Change-Id: I9d8a8dc42333582bd789abe8383e388c946b428d --- .../utc-Dali-Internal-ResourceClient.cpp | 14 +++---- .../src/dali-internal/utc-Dali-Internal-Text.cpp | 8 ++-- .../src/dali-unmanaged/utc-Dali-DynamicsBody.cpp | 2 +- .../dali-unmanaged/utc-Dali-EncodedBufferImage.cpp | 8 ++-- .../src/dali-unmanaged/utc-Dali-LightActor.cpp | 6 +-- .../src/dali-unmanaged/utc-Dali-MeshActor.cpp | 8 ++-- .../src/dali-unmanaged/utc-Dali-Model.cpp | 2 +- .../src/dali-unmanaged/utc-Dali-ShaderEffect.cpp | 4 +- .../src/dali-unmanaged/utc-Dali-Spline.cpp | 30 +++++++-------- .../src/dali-unmanaged/utc-Dali-Vector.cpp | 44 +++++++++++----------- .../dali-test-suite-utils.cpp | 26 +------------ .../dali-test-suite-utils/dali-test-suite-utils.h | 21 +++++------ automated-tests/src/dali/utc-Dali-Actor.cpp | 10 ++--- .../src/dali/utc-Dali-AnimatableMesh.cpp | 18 ++++----- automated-tests/src/dali/utc-Dali-Animation.cpp | 35 ++++++++--------- automated-tests/src/dali/utc-Dali-Any.cpp | 6 +-- automated-tests/src/dali/utc-Dali-CameraActor.cpp | 4 +- automated-tests/src/dali/utc-Dali-Constraint.cpp | 4 +- .../src/dali/utc-Dali-GestureDetector.cpp | 33 +++++++--------- automated-tests/src/dali/utc-Dali-Handle.cpp | 4 +- automated-tests/src/dali/utc-Dali-Matrix.cpp | 8 ++-- automated-tests/src/dali/utc-Dali-Path.cpp | 12 +++--- .../src/dali/utc-Dali-PropertyNotification.cpp | 2 +- automated-tests/src/dali/utc-Dali-ShaderEffect.cpp | 6 +-- automated-tests/src/dali/utc-Dali-Text.cpp | 20 +++++----- automated-tests/src/dali/utc-Dali-Vector2.cpp | 4 +- automated-tests/src/dali/utc-Dali-Vector3.cpp | 4 +- automated-tests/src/dali/utc-Dali-Vector4.cpp | 4 +- dali/public-api/common/dali-common.cpp | 30 ++++++++++----- dali/public-api/common/dali-common.h | 37 ++++++++++-------- 30 files changed, 199 insertions(+), 215 deletions(-) diff --git a/automated-tests/src/dali-internal/utc-Dali-Internal-ResourceClient.cpp b/automated-tests/src/dali-internal/utc-Dali-Internal-ResourceClient.cpp index 0fb9244..de5dc60 100644 --- a/automated-tests/src/dali-internal/utc-Dali-Internal-ResourceClient.cpp +++ b/automated-tests/src/dali-internal/utc-Dali-Internal-ResourceClient.cpp @@ -810,11 +810,11 @@ int UtcDaliInternalSaveResource02(void) try { resourceClient.SaveResource( aTicket, "model.dali-bin" ); // Should be outside range of valid resources! - } catch (DaliException& e) + } + catch (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_ASSERT(e, "mImpl->mTickets.find(ticket->GetId()) != mImpl->mTickets.end()", TEST_LOCATION ); } @@ -857,12 +857,12 @@ int UtcDaliInternalSaveResource03(void) try { resourceClient.SaveResource( aTicket, "model.dali-bin" ); // Should be outside range of valid resources! - } catch (DaliException& e) + } + catch (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_EQUALS(e.mCondition, "ticket", TEST_LOCATION); + DALI_TEST_PRINT_ASSERT( e ); + DALI_TEST_EQUALS(e.condition, "ticket", TEST_LOCATION); } application.SendNotification(); // Flush update messages diff --git a/automated-tests/src/dali-internal/utc-Dali-Internal-Text.cpp b/automated-tests/src/dali-internal/utc-Dali-Internal-Text.cpp index f482755..59e39ef 100644 --- a/automated-tests/src/dali-internal/utc-Dali-Internal-Text.cpp +++ b/automated-tests/src/dali-internal/utc-Dali-Internal-Text.cpp @@ -71,8 +71,8 @@ int UtcDaliTextGetImplementation02(void) } catch( DaliException& e ) { - tet_printf( "Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str() ); - DALI_TEST_EQUALS( e.mCondition, "NULL != mImpl && \"Text::GetImplementation: Text is uninitialized\"", TEST_LOCATION ); + DALI_TEST_PRINT_ASSERT( e ); + DALI_TEST_EQUALS( e.condition, "NULL != mImpl && \"Text::GetImplementation: Text is uninitialized\"", TEST_LOCATION ); assert1 = true; } @@ -84,8 +84,8 @@ int UtcDaliTextGetImplementation02(void) } catch( DaliException& e ) { - tet_printf( "Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str() ); - DALI_TEST_EQUALS( e.mCondition, "NULL != mImpl && \"Text::GetImplementation: Text is uninitialized\"", TEST_LOCATION ); + DALI_TEST_PRINT_ASSERT( e ); + DALI_TEST_EQUALS( e.condition, "NULL != mImpl && \"Text::GetImplementation: Text is uninitialized\"", TEST_LOCATION ); assert2 = true; } diff --git a/automated-tests/src/dali-unmanaged/utc-Dali-DynamicsBody.cpp b/automated-tests/src/dali-unmanaged/utc-Dali-DynamicsBody.cpp index 41d452d..7dc259e 100644 --- a/automated-tests/src/dali-unmanaged/utc-Dali-DynamicsBody.cpp +++ b/automated-tests/src/dali-unmanaged/utc-Dali-DynamicsBody.cpp @@ -516,7 +516,7 @@ int UtcDaliDynamicsBodyAddAnchor(void) } 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_CHECK( false ); } diff --git a/automated-tests/src/dali-unmanaged/utc-Dali-EncodedBufferImage.cpp b/automated-tests/src/dali-unmanaged/utc-Dali-EncodedBufferImage.cpp index ba99845..1679189 100644 --- a/automated-tests/src/dali-unmanaged/utc-Dali-EncodedBufferImage.cpp +++ b/automated-tests/src/dali-unmanaged/utc-Dali-EncodedBufferImage.cpp @@ -816,8 +816,8 @@ int UtcDaliEncodedBufferImageNew02(void) 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_ASSERT_CONDITION_STARTS_WITH_SUBSTRING(e, "encodedImage && \"Null image pointer passed-in for decoding from memory.\"", TEST_LOCATION); + DALI_TEST_PRINT_ASSERT( e ); + DALI_TEST_ASSERT(e, "encodedImage && \"Null image pointer passed-in for decoding from memory.\"", TEST_LOCATION); } END_TEST; } @@ -845,8 +845,8 @@ int UtcDaliEncodedBufferImageNew03(void) 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_ASSERT_CONDITION_STARTS_WITH_SUBSTRING(e, "encodedImageByteCount > 0U && \"Zero size passed for image resource in memory buffer.\"", TEST_LOCATION); + DALI_TEST_PRINT_ASSERT( e ); + DALI_TEST_ASSERT(e, "encodedImageByteCount > 0U && \"Zero size passed for image resource in memory buffer.\"", TEST_LOCATION); } END_TEST; } diff --git a/automated-tests/src/dali-unmanaged/utc-Dali-LightActor.cpp b/automated-tests/src/dali-unmanaged/utc-Dali-LightActor.cpp index 5459684..533bf87 100644 --- a/automated-tests/src/dali-unmanaged/utc-Dali-LightActor.cpp +++ b/automated-tests/src/dali-unmanaged/utc-Dali-LightActor.cpp @@ -133,7 +133,7 @@ int UtcDaliLightActorSetGetLight(void) } 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 ); tet_result(TET_FAIL); } catch( ... ) @@ -170,7 +170,7 @@ int UtcDaliLightActorSetGetActive(void) } 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 ); tet_result(TET_FAIL); } catch( ... ) @@ -237,7 +237,7 @@ int UtcDaliLightActorMeshTest(void) } 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 ); tet_result(TET_FAIL); } catch( ... ) diff --git a/automated-tests/src/dali-unmanaged/utc-Dali-MeshActor.cpp b/automated-tests/src/dali-unmanaged/utc-Dali-MeshActor.cpp index 7d62217..54faee1 100644 --- a/automated-tests/src/dali-unmanaged/utc-Dali-MeshActor.cpp +++ b/automated-tests/src/dali-unmanaged/utc-Dali-MeshActor.cpp @@ -96,7 +96,7 @@ int UtcDaliMeshActorCreateNoMeshData(void) } 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, "object", TEST_LOCATION); } END_TEST; @@ -120,7 +120,7 @@ int UtcDaliMeshActorCreateSetData01(void) } 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, "!vertices.empty()", TEST_LOCATION ); } END_TEST; @@ -144,7 +144,7 @@ int UtcDaliMeshActorCreateSetData02(void) } 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, "!faceIndices.empty", TEST_LOCATION ); } END_TEST; @@ -169,7 +169,7 @@ int UtcDaliMeshActorCreateSetData03(void) } 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, "material", TEST_LOCATION ); } END_TEST; diff --git a/automated-tests/src/dali-unmanaged/utc-Dali-Model.cpp b/automated-tests/src/dali-unmanaged/utc-Dali-Model.cpp index ff27252..cc6c9d9 100644 --- a/automated-tests/src/dali-unmanaged/utc-Dali-Model.cpp +++ b/automated-tests/src/dali-unmanaged/utc-Dali-Model.cpp @@ -297,7 +297,7 @@ int UtcDaliModelActorFactoryTwoMesh(void) } catch( Dali::DaliException& e ) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT(e, "entity.NumberOfMeshes() == 1", TEST_LOCATION); DALI_TEST_CHECK( !actor ); } diff --git a/automated-tests/src/dali-unmanaged/utc-Dali-ShaderEffect.cpp b/automated-tests/src/dali-unmanaged/utc-Dali-ShaderEffect.cpp index 1172c1f..252ec9d 100644 --- a/automated-tests/src/dali-unmanaged/utc-Dali-ShaderEffect.cpp +++ b/automated-tests/src/dali-unmanaged/utc-Dali-ShaderEffect.cpp @@ -157,7 +157,7 @@ int UtcDaliShaderEffectFromProperties02(void) } 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 ); } END_TEST; } @@ -188,7 +188,7 @@ int UtcDaliShaderEffectFromProperties03(void) } 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 ); } END_TEST; } diff --git a/automated-tests/src/dali-unmanaged/utc-Dali-Spline.cpp b/automated-tests/src/dali-unmanaged/utc-Dali-Spline.cpp index 6d3b629..d9484a8 100644 --- a/automated-tests/src/dali-unmanaged/utc-Dali-Spline.cpp +++ b/automated-tests/src/dali-unmanaged/utc-Dali-Spline.cpp @@ -158,7 +158,7 @@ int utcDaliSplineGetKnot02(void) } 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, "knotIndex < mKnots.size()", TEST_LOCATION); } END_TEST; @@ -177,7 +177,7 @@ int utcDaliSplineGetKnot03(void) } 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, "knotIndex < mKnots.size()", TEST_LOCATION); } END_TEST; @@ -217,7 +217,7 @@ int utcDaliSplineGetInTangent02(void) } 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, "knotIndex < mInTangents.size()", TEST_LOCATION); } END_TEST; @@ -236,7 +236,7 @@ int utcDaliSplineGetInTangent03(void) } 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, "knotIndex < mInTangents.size()", TEST_LOCATION); } END_TEST; @@ -277,7 +277,7 @@ int utcDaliSplineGetOutTangent02(void) } 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, "knotIndex < mOutTangents.size()", TEST_LOCATION); } END_TEST; @@ -296,7 +296,7 @@ int utcDaliSplineGetOutTangent03(void) } 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, "knotIndex < mOutTangents.size()", TEST_LOCATION); } END_TEST; @@ -346,7 +346,7 @@ int utcDaliSplineGenerateControlPoints02(void) } 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, "numKnots > 1", TEST_LOCATION); } END_TEST; @@ -366,7 +366,7 @@ int utcDaliSplineGenerateControlPoints03(void) } 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, "numKnots > 1", TEST_LOCATION); } END_TEST; @@ -404,7 +404,7 @@ int UtcDaliSplineGetY02(void) } 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, "segmentIndex+1 < mKnots.size() && segmentIndex < mKnots.size()", TEST_LOCATION); } END_TEST; @@ -425,7 +425,7 @@ int UtcDaliSplineGetY02b(void) } 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, "segmentIndex+1 < mKnots.size() && segmentIndex < mKnots.size()", TEST_LOCATION); } END_TEST; @@ -456,7 +456,7 @@ int UtcDaliSplineGetY04(void) } 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, "segmentIndex+1 < mKnots.size() && segmentIndex < mKnots.size()", TEST_LOCATION); } END_TEST; @@ -476,7 +476,7 @@ int UtcDaliSplineGetY04b(void) } 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, "segmentIndex+1 < mKnots.size() && segmentIndex < mKnots.size()", TEST_LOCATION); } END_TEST; @@ -571,7 +571,7 @@ int UtcDaliSplineGetPoint03(void) } 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, "segmentIndex+1 < mKnots.size() && segmentIndex < mKnots.size()", TEST_LOCATION); } END_TEST; @@ -591,7 +591,7 @@ int UtcDaliSplineGetPoint04(void) } 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, "segmentIndex+1 < mKnots.size() && segmentIndex < mKnots.size()", TEST_LOCATION); } END_TEST; @@ -627,7 +627,7 @@ int UtcDaliSplineGetPoint06(void) } 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, "segmentIndex+1 < mKnots.size() && segmentIndex < mKnots.size()", TEST_LOCATION); } END_TEST; diff --git a/automated-tests/src/dali-unmanaged/utc-Dali-Vector.cpp b/automated-tests/src/dali-unmanaged/utc-Dali-Vector.cpp index 0e89d85..6b5c751 100644 --- a/automated-tests/src/dali-unmanaged/utc-Dali-Vector.cpp +++ b/automated-tests/src/dali-unmanaged/utc-Dali-Vector.cpp @@ -236,7 +236,7 @@ int UtcDaliVectorIntErase(void) } catch( Dali::DaliException& e ) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT( e, "(iterator < End())", TEST_LOCATION ); } catch( ... ) @@ -253,7 +253,7 @@ int UtcDaliVectorIntErase(void) } catch( Dali::DaliException& e ) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT( e, "(iterator < End()) && (iterator >= Begin())", TEST_LOCATION ); } catch( ... ) @@ -285,7 +285,7 @@ int UtcDaliVectorIntErase(void) } catch( Dali::DaliException& e ) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT( e, "(iterator < End())", TEST_LOCATION ); } catch( ... ) @@ -307,7 +307,7 @@ int UtcDaliVectorIntErase(void) } catch( Dali::DaliException& e ) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT( e, "(iterator < End())", TEST_LOCATION ); } catch( ... ) @@ -400,7 +400,7 @@ int UtcDaliVectorDoubleRemove(void) } catch( Dali::DaliException& e ) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT( e, "(iterator < End()) && (iterator >= Begin())", TEST_LOCATION ); } catch( ... ) @@ -422,7 +422,7 @@ int UtcDaliVectorDoubleRemove(void) } catch( Dali::DaliException& e ) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT( e, "(iterator < End()) && (iterator >= Begin())", TEST_LOCATION ); } catch( ... ) @@ -551,7 +551,7 @@ int UtcDaliVectorAsserts(void) } catch(Dali::DaliException& e) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT( e, "VectorBase::mData", TEST_LOCATION ); } catch(...) @@ -570,7 +570,7 @@ int UtcDaliVectorAsserts(void) } catch(Dali::DaliException& e) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT( e, "VectorBase::mData", TEST_LOCATION ); } catch(...) @@ -593,7 +593,7 @@ int UtcDaliVectorAsserts(void) } catch(Dali::DaliException& e) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT( e, "(iterator < End()) && (iterator >= Begin())", TEST_LOCATION ); } catch(...) @@ -616,7 +616,7 @@ int UtcDaliVectorAsserts(void) } catch(Dali::DaliException& e) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT( e, "(iterator < End()) && (iterator >= Begin())", TEST_LOCATION ); } catch(...) @@ -656,7 +656,7 @@ int UtcDaliVectorAsserts(void) } catch(Dali::DaliException& e) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT( e, "index < VectorBase::Count()", TEST_LOCATION ); } catch(...) @@ -674,7 +674,7 @@ int UtcDaliVectorAsserts(void) } catch(Dali::DaliException& e) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT( e, "index < VectorBase::Count()", TEST_LOCATION ); } catch(...) @@ -829,7 +829,7 @@ int UtcDaliVectorInsert01(void) } catch( Dali::DaliException& e ) { - tet_printf( "Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str() ); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT( e, "( at <= End() ) && ( at >= Begin() )", TEST_LOCATION ); } catch( ... ) @@ -846,7 +846,7 @@ int UtcDaliVectorInsert01(void) } catch( Dali::DaliException& e ) { - tet_printf( "Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str() ); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT( e, "( at <= End() ) && ( at >= Begin() )", TEST_LOCATION ); } catch( ... ) @@ -1013,7 +1013,7 @@ int UtcDaliVectorIntInsertAssert(void) } catch( Dali::DaliException& e ) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT( e, "( at <= End() ) && ( at >= Begin() )", TEST_LOCATION ); } catch( ... ) @@ -1029,7 +1029,7 @@ int UtcDaliVectorIntInsertAssert(void) } catch( Dali::DaliException& e ) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT( e, "( at <= End() ) && ( at >= Begin() )", TEST_LOCATION ); } catch( ... ) @@ -1045,7 +1045,7 @@ int UtcDaliVectorIntInsertAssert(void) } catch( Dali::DaliException& e ) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT( e, "( from <= to )", TEST_LOCATION ); } catch( ... ) @@ -1168,7 +1168,7 @@ int UtcDaliVectorIntEraseRangeAssert(void) } catch( Dali::DaliException& e ) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT( e, "( first <= End() ) && ( first >= Begin() )", TEST_LOCATION ); } catch( ... ) @@ -1185,7 +1185,7 @@ int UtcDaliVectorIntEraseRangeAssert(void) } catch( Dali::DaliException& e ) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT( e, "( first <= End() ) && ( first >= Begin() )", TEST_LOCATION ); } catch( ... ) @@ -1204,7 +1204,7 @@ int UtcDaliVectorIntEraseRangeAssert(void) } catch( Dali::DaliException& e ) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT( e, "( last <= End() ) && ( last >= Begin() )", TEST_LOCATION ); } catch( ... ) @@ -1221,7 +1221,7 @@ int UtcDaliVectorIntEraseRangeAssert(void) } catch( Dali::DaliException& e ) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT( e, "( last <= End() ) && ( last >= Begin() )", TEST_LOCATION ); } catch( ... ) @@ -1241,7 +1241,7 @@ int UtcDaliVectorIntEraseRangeAssert(void) } catch( Dali::DaliException& e ) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT( e, "( first <= last )", TEST_LOCATION ); } catch( ... ) diff --git a/automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.cpp b/automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.cpp index f70e3be..2e2f201 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.cpp +++ b/automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.cpp @@ -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 ) { - 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 @@ -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 ) diff --git a/automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.h b/automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.h index 375fb90..13db421 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.h +++ b/automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.h @@ -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 - * 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. - * - * @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 ); -/** 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 diff --git a/automated-tests/src/dali/utc-Dali-Actor.cpp b/automated-tests/src/dali/utc-Dali-Actor.cpp index 723892e..758765f 100644 --- a/automated-tests/src/dali/utc-Dali-Actor.cpp +++ b/automated-tests/src/dali/utc-Dali-Actor.cpp @@ -363,7 +363,7 @@ int UtcDaliActorAdd(void) } catch(Dali::DaliException& e) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT(e, "this != &child", TEST_LOCATION); DALI_TEST_EQUALS( parent2.GetChildCount(), 1u, TEST_LOCATION ); } @@ -382,7 +382,7 @@ int UtcDaliActorAdd(void) } catch(Dali::DaliException& e) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT(e, "!child.IsRoot()", TEST_LOCATION); DALI_TEST_EQUALS( parent2.GetChildCount(), 1u, TEST_LOCATION ); } @@ -402,7 +402,7 @@ int UtcDaliActorAdd(void) } catch(Dali::DaliException& e) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT(e, "actor", TEST_LOCATION); DALI_TEST_EQUALS( parent2.GetChildCount(), 1u, TEST_LOCATION ); } @@ -471,7 +471,7 @@ int UtcDaliActorRemove01(void) } catch(Dali::DaliException& e) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT(e, "this != &child", TEST_LOCATION); DALI_TEST_EQUALS( parent.GetChildCount(), 1u, TEST_LOCATION ); } @@ -491,7 +491,7 @@ int UtcDaliActorRemove01(void) } catch(Dali::DaliException& e) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT(e, "actor", TEST_LOCATION); DALI_TEST_EQUALS( parent.GetChildCount(), 1u, TEST_LOCATION ); } diff --git a/automated-tests/src/dali/utc-Dali-AnimatableMesh.cpp b/automated-tests/src/dali/utc-Dali-AnimatableMesh.cpp index 86404cb..653f5c5 100644 --- a/automated-tests/src/dali/utc-Dali-AnimatableMesh.cpp +++ b/automated-tests/src/dali/utc-Dali-AnimatableMesh.cpp @@ -147,7 +147,7 @@ int UtcDaliAnimatableMeshNew03(void) } 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, "numVertices > 0", TEST_LOCATION); } END_TEST; @@ -167,7 +167,7 @@ int UtcDaliAnimatableMeshNew04(void) } 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, "faceIndices.size() > 0", TEST_LOCATION); } END_TEST; @@ -188,7 +188,7 @@ int UtcDaliAnimatableMeshNew05(void) } 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, "faceIndex < numVertices", TEST_LOCATION); } END_TEST; @@ -209,7 +209,7 @@ int UtcDaliAnimatableMeshNew06(void) } 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, "material", TEST_LOCATION); } END_TEST; @@ -264,7 +264,7 @@ int UtcDaliAnimatableMeshGetPropertyIndex02(void) } 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, "index < GetNumberOfVertices()", TEST_LOCATION); } END_TEST; @@ -283,7 +283,7 @@ int UtcDaliAnimatableMeshGetPropertyIndex03(void) } 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, "index < GetNumberOfVertices()", TEST_LOCATION); } END_TEST; @@ -302,7 +302,7 @@ int UtcDaliAnimatableMeshGetPropertyIndex04(void) } 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, "index < GetNumberOfVertices()", TEST_LOCATION); } END_TEST; @@ -345,7 +345,7 @@ int UtcDaliAnimatableMeshOperatorArray02(void) } 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, "index < GetNumberOfVertices()", TEST_LOCATION); } END_TEST; @@ -439,7 +439,7 @@ int UtcDaliAnimatableMeshExceedVertices(void) } catch ( DaliException& e ) { - DALI_TEST_ASSERT_CONDITION_STARTS_WITH_SUBSTRING( e, "( numVertices * 3 ) < DEFAULT_PROPERTY_MAX_COUNT", TEST_LOCATION ); + DALI_TEST_ASSERT( e, "( numVertices * 3 ) < DEFAULT_PROPERTY_MAX_COUNT", TEST_LOCATION ); } END_TEST; } diff --git a/automated-tests/src/dali/utc-Dali-Animation.cpp b/automated-tests/src/dali/utc-Dali-Animation.cpp index 84e541c..2dbb814 100644 --- a/automated-tests/src/dali/utc-Dali-Animation.cpp +++ b/automated-tests/src/dali/utc-Dali-Animation.cpp @@ -115,12 +115,9 @@ int UtcDaliAnimationNew02(void) } catch (Dali::DaliException& e) { - // TODO: Determine why catch doesn't. - // - // 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_EQUALS(e.mCondition, "durationSeconds > 0.0f", TEST_LOCATION); + DALI_TEST_PRINT_ASSERT( e ); + DALI_TEST_EQUALS(e.condition, "durationSeconds > 0.0f", TEST_LOCATION); } END_TEST; } @@ -4645,7 +4642,7 @@ int UtcDaliAnimationAnimateToActorParentOrigin(void) } 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, "IsPropertyAnimatable(index)", TEST_LOCATION); } END_TEST; @@ -4672,7 +4669,7 @@ int UtcDaliAnimationAnimateToActorParentOriginX(void) } 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, "IsPropertyAnimatable(index)", TEST_LOCATION); } END_TEST; @@ -4699,7 +4696,7 @@ int UtcDaliAnimationAnimateToActorParentOriginY(void) } 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, "IsPropertyAnimatable(index)", TEST_LOCATION); } END_TEST; @@ -4726,7 +4723,7 @@ int UtcDaliAnimationAnimateToActorParentOriginZ(void) } 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, "IsPropertyAnimatable(index)", TEST_LOCATION); } END_TEST; @@ -4751,7 +4748,7 @@ int UtcDaliAnimationAnimateToActorAnchorPoint(void) } 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, "IsPropertyAnimatable(index)", TEST_LOCATION); } END_TEST; @@ -4778,7 +4775,7 @@ int UtcDaliAnimationAnimateToActorAnchorPointX(void) } 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, "IsPropertyAnimatable(index)", TEST_LOCATION); } END_TEST; @@ -4805,7 +4802,7 @@ int UtcDaliAnimationAnimateToActorAnchorPointY(void) } 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, "IsPropertyAnimatable(index)", TEST_LOCATION); } END_TEST; @@ -4832,7 +4829,7 @@ int UtcDaliAnimationAnimateToActorAnchorPointZ(void) } 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, "IsPropertyAnimatable(index)", TEST_LOCATION); } END_TEST; @@ -6341,7 +6338,7 @@ int UtcDaliAnimationKeyFrames01(void) } 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, "mType == value.GetType()", TEST_LOCATION); } END_TEST; @@ -6369,7 +6366,7 @@ int UtcDaliAnimationKeyFrames02(void) } 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, "mType == value.GetType()", TEST_LOCATION); } END_TEST; @@ -6398,7 +6395,7 @@ int UtcDaliAnimationKeyFrames03(void) } 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, "mType == value.GetType()", TEST_LOCATION); } END_TEST; @@ -6427,7 +6424,7 @@ int UtcDaliAnimationKeyFrames04(void) } 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, "mType == value.GetType()", TEST_LOCATION); } END_TEST; @@ -6455,7 +6452,7 @@ int UtcDaliAnimationKeyFrames05(void) } 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, "mType == value.GetType()", TEST_LOCATION); } END_TEST; @@ -6484,7 +6481,7 @@ int UtcDaliAnimationKeyFrames06(void) } 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, "mType == value.GetType()", TEST_LOCATION); } END_TEST; diff --git a/automated-tests/src/dali/utc-Dali-Any.cpp b/automated-tests/src/dali/utc-Dali-Any.cpp index 82908a0..f9a4348 100644 --- a/automated-tests/src/dali/utc-Dali-Any.cpp +++ b/automated-tests/src/dali/utc-Dali-Any.cpp @@ -180,7 +180,7 @@ int UtcDaliAnyNegativeAssignmentOperators(void) } 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 ); assert = true; } @@ -293,7 +293,7 @@ int UtcDaliAnyNegativeGet(void) 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 ); assert1 = true; } @@ -304,7 +304,7 @@ int UtcDaliAnyNegativeGet(void) 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 ); assert2 = true; } diff --git a/automated-tests/src/dali/utc-Dali-CameraActor.cpp b/automated-tests/src/dali/utc-Dali-CameraActor.cpp index d8fbd1d..2d57e48 100644 --- a/automated-tests/src/dali/utc-Dali-CameraActor.cpp +++ b/automated-tests/src/dali/utc-Dali-CameraActor.cpp @@ -376,7 +376,7 @@ int UtcDaliCameraActorSetType02(void) } catch ( Dali::DaliException& e ) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT(e, "camera", TEST_LOCATION); } @@ -388,7 +388,7 @@ int UtcDaliCameraActorSetType02(void) } catch ( Dali::DaliException& e ) { - tet_printf("Assertion %s test at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); DALI_TEST_ASSERT(e, "camera", TEST_LOCATION); } diff --git a/automated-tests/src/dali/utc-Dali-Constraint.cpp b/automated-tests/src/dali/utc-Dali-Constraint.cpp index 86b16e6..02f20d7 100644 --- a/automated-tests/src/dali/utc-Dali-Constraint.cpp +++ b/automated-tests/src/dali/utc-Dali-Constraint.cpp @@ -1059,7 +1059,7 @@ int UtcDaliConstraintNewMatrix(void) } 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_CHECK(0); } END_TEST; @@ -1096,7 +1096,7 @@ int UtcDaliConstraintNewMatrix3(void) } 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_CHECK(0); } END_TEST; diff --git a/automated-tests/src/dali/utc-Dali-GestureDetector.cpp b/automated-tests/src/dali/utc-Dali-GestureDetector.cpp index e79824e..4d06575 100644 --- a/automated-tests/src/dali/utc-Dali-GestureDetector.cpp +++ b/automated-tests/src/dali/utc-Dali-GestureDetector.cpp @@ -48,12 +48,9 @@ int UtcDaliGestureDetectorConstructorNegative(void) detector.Attach(actor); tet_result(TET_FAIL); } - catch (DaliException& exception) + catch (DaliException& e) { - if ( exception.mCondition.find("detector") != std::string::npos ) - { - tet_result(TET_PASS); - } + DALI_TEST_ASSERT( e, "detector", TEST_LOCATION ); } END_TEST; } @@ -72,8 +69,9 @@ int UtcDaliGestureDetectorConstructorPositive(void) detector.Attach(actor); tet_result(TET_PASS); } - catch (DaliException& exception) + catch (DaliException& e) { + DALI_TEST_PRINT_ASSERT( e ); tet_result(TET_FAIL); } END_TEST; @@ -151,12 +149,9 @@ int UtcDaliGestureDetectorAttachNegative(void) detector.Attach(actor); tet_result(TET_FAIL); } - catch (DaliException& exception) + catch (DaliException& e) { - if ( exception.mCondition.find("actor") != std::string::npos ) - { - tet_result(TET_PASS); - } + DALI_TEST_ASSERT( e, "actor", TEST_LOCATION ); } END_TEST; } @@ -211,12 +206,9 @@ int UtcDaliGestureDetectorDetachNegative01(void) detector.Detach(actor); tet_result(TET_FAIL); } - catch (DaliException& exception) + catch (DaliException& e) { - if ( exception.mCondition.find("actor") != std::string::npos ) - { - tet_result(TET_PASS); - } + DALI_TEST_ASSERT( e, "actor", TEST_LOCATION ); } END_TEST; } @@ -238,8 +230,9 @@ int UtcDaliGestureDetectorDetachNegative02(void) detector.Detach(actor2); tet_result(TET_PASS); } - catch (DaliException& exception) + catch (DaliException& e) { + DALI_TEST_PRINT_ASSERT( e ); tet_result(TET_FAIL); } END_TEST; @@ -266,8 +259,9 @@ int UtcDaliGestureDetectorDetachNegative03(void) detector.Detach(actor); DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::UnregisterType), TEST_LOCATION); } - catch (DaliException& exception) + catch (DaliException& e) { + DALI_TEST_PRINT_ASSERT( e ); tet_result(TET_FAIL); } END_TEST; @@ -336,8 +330,9 @@ int UtcDaliGestureDetectorDetachAllNegative(void) detector.DetachAll(); DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::UnregisterType), TEST_LOCATION); } - catch (DaliException& exception) + catch (DaliException& e) { + DALI_TEST_PRINT_ASSERT( e ); tet_result(TET_FAIL); } END_TEST; diff --git a/automated-tests/src/dali/utc-Dali-Handle.cpp b/automated-tests/src/dali/utc-Dali-Handle.cpp index 0eb04f3..a2314d1 100644 --- a/automated-tests/src/dali/utc-Dali-Handle.cpp +++ b/automated-tests/src/dali/utc-Dali-Handle.cpp @@ -656,7 +656,7 @@ int UtcDaliHandleNonAnimtableCompositeProperties(void) catch (Dali::DaliException& e) { exception = true; - tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str()); + DALI_TEST_PRINT_ASSERT( e ); } DALI_TEST_EQUALS(exception, true, TEST_LOCATION); @@ -721,7 +721,7 @@ int UtcDaliHandleSetProperty02(void) } 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, "IsDefaultPropertyWritable(index) && \"Property is read-only\"", TEST_LOCATION); } diff --git a/automated-tests/src/dali/utc-Dali-Matrix.cpp b/automated-tests/src/dali/utc-Dali-Matrix.cpp index 70e1188..d612fbb 100644 --- a/automated-tests/src/dali/utc-Dali-Matrix.cpp +++ b/automated-tests/src/dali/utc-Dali-Matrix.cpp @@ -222,7 +222,7 @@ int UtcDaliMatrixInvertTransform02(void) } 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, exceptionString, TEST_LOCATION ); } @@ -240,7 +240,7 @@ int UtcDaliMatrixInvertTransform02(void) } 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, exceptionString, TEST_LOCATION ); } @@ -258,7 +258,7 @@ int UtcDaliMatrixInvertTransform02(void) } 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, exceptionString, TEST_LOCATION ); } @@ -276,7 +276,7 @@ int UtcDaliMatrixInvertTransform02(void) } 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, exceptionString, TEST_LOCATION ); } END_TEST; diff --git a/automated-tests/src/dali/utc-Dali-Path.cpp b/automated-tests/src/dali/utc-Dali-Path.cpp index 2dbb9ee..395aece 100644 --- a/automated-tests/src/dali/utc-Dali-Path.cpp +++ b/automated-tests/src/dali/utc-Dali-Path.cpp @@ -79,7 +79,7 @@ int utcDaliPathGetPoint02(void) } 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, "index < mPoint.Size()", TEST_LOCATION); } END_TEST; @@ -98,7 +98,7 @@ int utcDaliPathGetPoint03(void) } 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, "index < mPoint.Size()", TEST_LOCATION); } END_TEST; @@ -132,7 +132,7 @@ int utcDaliPathGetControlPoints01(void) } 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, "index < mControlPoint.Size()", TEST_LOCATION); } END_TEST; @@ -150,7 +150,7 @@ int utcDaliPathGetControlPoints02(void) } 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, "index < mControlPoint.Size()", TEST_LOCATION); } END_TEST; @@ -201,7 +201,7 @@ int utcDaliPathGenerateControlPoints02(void) } 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, "numSegments > 0", TEST_LOCATION); } END_TEST; @@ -220,7 +220,7 @@ int utcDaliPathGenerateControlPoints03(void) } 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, "numSegments > 0", TEST_LOCATION); } END_TEST; diff --git a/automated-tests/src/dali/utc-Dali-PropertyNotification.cpp b/automated-tests/src/dali/utc-Dali-PropertyNotification.cpp index 18d3d70..8d20317 100644 --- a/automated-tests/src/dali/utc-Dali-PropertyNotification.cpp +++ b/automated-tests/src/dali/utc-Dali-PropertyNotification.cpp @@ -260,7 +260,7 @@ int UtcDaliAddPropertyNotificationTypeProperty(void) } catch ( DaliException& e ) { - DALI_TEST_ASSERT_CONDITION_STARTS_WITH_SUBSTRING( e, "false && \"Property notification added to non animatable property", TEST_LOCATION ); + DALI_TEST_ASSERT( e, "false && \"Property notification added to event side only property", TEST_LOCATION ); } END_TEST; } diff --git a/automated-tests/src/dali/utc-Dali-ShaderEffect.cpp b/automated-tests/src/dali/utc-Dali-ShaderEffect.cpp index ba2a30e..184b6be 100644 --- a/automated-tests/src/dali/utc-Dali-ShaderEffect.cpp +++ b/automated-tests/src/dali/utc-Dali-ShaderEffect.cpp @@ -144,7 +144,7 @@ int UtcDaliShaderEffectMethodNew02(void) 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; @@ -216,7 +216,7 @@ int UtcDaliShaderEffectMethodNew04(void) } 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 ); tet_result( TET_FAIL ); } END_TEST; @@ -975,7 +975,7 @@ int UtcDaliShaderEffectMethodNoExtension(void) 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; diff --git a/automated-tests/src/dali/utc-Dali-Text.cpp b/automated-tests/src/dali/utc-Dali-Text.cpp index e9ebb97..3aef490 100644 --- a/automated-tests/src/dali/utc-Dali-Text.cpp +++ b/automated-tests/src/dali/utc-Dali-Text.cpp @@ -164,8 +164,8 @@ int UtcDaliTextAccessOperator01(void) } catch( DaliException& e ) { - tet_printf( "Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str() ); - DALI_TEST_EQUALS( e.mCondition, "NULL != mImpl && \"Text::operator[]: Text is uninitialized\"", TEST_LOCATION ); + DALI_TEST_PRINT_ASSERT( e ); + DALI_TEST_EQUALS( e.condition, "NULL != mImpl && \"Text::operator[]: Text is uninitialized\"", TEST_LOCATION ); assert1 = true; } @@ -179,8 +179,8 @@ int UtcDaliTextAccessOperator01(void) } catch( DaliException& e ) { - tet_printf( "Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str() ); - DALI_TEST_EQUALS( e.mCondition, "position < mString.Count() && \"Text::operator[]: Character position is out of bounds\"", TEST_LOCATION ); + DALI_TEST_PRINT_ASSERT( e ); + DALI_TEST_EQUALS( e.condition, "position < mString.Count() && \"Text::operator[]: Character position is out of bounds\"", TEST_LOCATION ); assert2 = true; } @@ -295,8 +295,8 @@ int UtcDaliTextRemove01(void) } catch( DaliException& e ) { - tet_printf( "Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str() ); - DALI_TEST_EQUALS( e.mCondition, "position < mString.Count() && \"Text::Remove: Character position is out of bounds\"", TEST_LOCATION ); + DALI_TEST_PRINT_ASSERT( e ); + DALI_TEST_EQUALS( e.condition, "position < mString.Count() && \"Text::Remove: Character position is out of bounds\"", TEST_LOCATION ); assert1 = true; } @@ -306,8 +306,8 @@ int UtcDaliTextRemove01(void) } catch( DaliException& e ) { - tet_printf( "Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str() ); - DALI_TEST_EQUALS( e.mCondition, "position + numberOfCharacters <= mString.Count() && \"Text::Remove: Character position + numberOfCharacters is out of bounds\"", TEST_LOCATION ); + DALI_TEST_PRINT_ASSERT( e ); + DALI_TEST_EQUALS( e.condition, "position + numberOfCharacters <= mString.Count() && \"Text::Remove: Character position + numberOfCharacters is out of bounds\"", TEST_LOCATION ); assert2 = true; } @@ -318,8 +318,8 @@ int UtcDaliTextRemove01(void) } catch( DaliException& e ) { - tet_printf( "Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str() ); - DALI_TEST_EQUALS( e.mCondition, "NULL != mImpl && \"Text::Remove: Text is uninitialized\"", TEST_LOCATION ); + DALI_TEST_PRINT_ASSERT( e ); + DALI_TEST_EQUALS( e.condition, "NULL != mImpl && \"Text::Remove: Text is uninitialized\"", TEST_LOCATION ); assert3 = true; } diff --git a/automated-tests/src/dali/utc-Dali-Vector2.cpp b/automated-tests/src/dali/utc-Dali-Vector2.cpp index 8375100..68c8a0e 100644 --- a/automated-tests/src/dali/utc-Dali-Vector2.cpp +++ b/automated-tests/src/dali/utc-Dali-Vector2.cpp @@ -371,7 +371,7 @@ int UtcDaliVector2OperatorSubscript(void) } 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, "index < 2", TEST_LOCATION); } @@ -383,7 +383,7 @@ int UtcDaliVector2OperatorSubscript(void) } 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, "index < 2" , TEST_LOCATION); } diff --git a/automated-tests/src/dali/utc-Dali-Vector3.cpp b/automated-tests/src/dali/utc-Dali-Vector3.cpp index c0c4496..68b99bf 100644 --- a/automated-tests/src/dali/utc-Dali-Vector3.cpp +++ b/automated-tests/src/dali/utc-Dali-Vector3.cpp @@ -449,7 +449,7 @@ int UtcDaliVector3OperatorSubscript(void) } 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, "index < 3", TEST_LOCATION ); } @@ -461,7 +461,7 @@ int UtcDaliVector3OperatorSubscript(void) } 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, "index < 3", TEST_LOCATION); } diff --git a/automated-tests/src/dali/utc-Dali-Vector4.cpp b/automated-tests/src/dali/utc-Dali-Vector4.cpp index 547645c..bac69d2 100644 --- a/automated-tests/src/dali/utc-Dali-Vector4.cpp +++ b/automated-tests/src/dali/utc-Dali-Vector4.cpp @@ -482,7 +482,7 @@ int UtcDaliVector4OperatorSubscript(void) } 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, "index < 4", TEST_LOCATION ); } @@ -494,7 +494,7 @@ int UtcDaliVector4OperatorSubscript(void) } 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, "index < 4", TEST_LOCATION ); } END_TEST; diff --git a/dali/public-api/common/dali-common.cpp b/dali/public-api/common/dali-common.cpp index b080a33..25fa096 100644 --- a/dali/public-api/common/dali-common.cpp +++ b/dali/public-api/common/dali-common.cpp @@ -97,15 +97,19 @@ std::string Demangle(const char* symbol) return result; } -DALI_EXPORT_API DaliException::DaliException(const char *location, const char* condition) -: mLocation(location), mCondition(condition) +DALI_EXPORT_API DaliException::DaliException( const char* location, const char* condition ) +: location( location ), condition( condition ) { // Note, if a memory error has occured, then the backtrace won't work - backtrace_symbols relies on // allocating memory. // Initial dlog error message is output in DALI_ASSERT_ALWAYS macro // Also output on stderr - fprintf(stderr, "Exception: \n%s\n thrown at %s\nSee dlog for backtrace\n", mCondition.c_str(), mLocation.c_str()); +#if defined(DEBUG_ENABLED) + fprintf(stderr, "Exception: \n%s\n thrown at %s\nSee dlog for backtrace\n", condition, location); +#else + fprintf(stderr, "Exception: \n%s\n thrown\nSee dlog for backtrace\n", condition ); +#endif DALI_LOG_ERROR_NOFN("Backtrace:\n"); @@ -123,20 +127,26 @@ DALI_EXPORT_API DaliException::DaliException(const char *location, const char* c #else // BACKTRACE_ENABLED - -DALI_EXPORT_API DaliException::DaliException(const char *location, const char* condition) -: mLocation(location), mCondition(condition) +DALI_EXPORT_API DaliException::DaliException( const char* location, const char* condition ) +: location( location ), condition( condition ) { - printf("Exception: \n%s\n thrown at %s\nSee dlog for backtrace\n", mCondition.c_str(), mLocation.c_str()); +#if defined(DEBUG_ENABLED) + printf("Exception: \n%s\n thrown at %s\n", condition, location ); +#else + printf("Exception: \n%s\n thrown\n", condition ); +#endif } #endif // BACKTRACE_ENABLED - -DALI_EXPORT_API void DaliAssertMessage(const char* condition, const char* file, int line) +DALI_EXPORT_API void DaliAssertMessage( const char* location, const char* condition ) { - DALI_LOG_ERROR_NOFN( "Assertion (%s) failed in: %s:%d\n", condition, file, line ); +#if defined(DEBUG_ENABLED) + DALI_LOG_ERROR_NOFN( "Assert (%s) failed in: %s\n", condition, location ); +#else + DALI_LOG_ERROR_NOFN( "Assert (%s) failed\n", condition ); +#endif } } // Dali diff --git a/dali/public-api/common/dali-common.h b/dali/public-api/common/dali-common.h index 7166cc2..c5920c1 100644 --- a/dali/public-api/common/dali-common.h +++ b/dali/public-api/common/dali-common.h @@ -19,7 +19,6 @@ */ // EXTERNAL INCLUDES -#include #include #ifdef EMSCRIPTEN @@ -85,11 +84,10 @@ namespace Dali /** * @brief Method to log assertion message in DALI_ASSERT_ALWAYS macro below. * + * @param[in] location Where the assertion occurred * @param[in] condition The assertion condition - * @param[in] file The file in which the assertion occurred - * @param[in] line The line number at which the assertion occured */ -DALI_IMPORT_API void DaliAssertMessage(const char* condition, const char* file, int line); +DALI_IMPORT_API void DaliAssertMessage( const char* location, const char* condition ); /** * @brief Exception class for Dali Core library - Raised by assertions in codebase. @@ -105,10 +103,10 @@ public: * @param[in] location - the location of the assertion * @param[in] condition - The assertion condition */ - DaliException(const char *location, const char* condition); + DaliException( const char* location, const char* condition ); - std::string mLocation; ///< Location in code of the assertion - std::string mCondition; ///< The assertion string + const char* location; + const char* condition; }; }// Dali @@ -133,25 +131,34 @@ public: * (which it is often equivalent to in effect). * It should not be used for simple parameter validation for instance. */ + +/** + * Strip assert location for release builds, assert text is descriptive enough + * This is to save space for low spec devices + */ +#if defined(DEBUG_ENABLED) +#define ASSERT_LOCATION __PRETTY_FUNCTION__ +#else +#define ASSERT_LOCATION NULL +#endif + #ifdef EMSCRIPTEN #define DALI_ASSERT_ALWAYS(cond) \ if(!(cond)) \ { \ - Dali::DaliAssertMessage(#cond, __FILE__, __LINE__); \ - throw Dali::DaliException(__PRETTY_FUNCTION__, #cond); \ + Dali::DaliAssertMessage( ASSERT_LOCATION, #cond ); \ + throw Dali::DaliException( ASSERT_LOCATION, #cond ); \ EM_ASM(print(new Error().stack)); \ - }\ - + } #else #define DALI_ASSERT_ALWAYS(cond) \ if(!(cond)) \ { \ - Dali::DaliAssertMessage(#cond, __FILE__, __LINE__); \ - throw Dali::DaliException(__PRETTY_FUNCTION__, #cond); \ - }\ - + Dali::DaliAssertMessage( ASSERT_LOCATION, #cond ); \ + throw Dali::DaliException( ASSERT_LOCATION, #cond ); \ + } #endif /** -- 2.7.4