Update contrib.
1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Global configuration for the tests
25 #define TEST_FOR_ERROR( r ) __testForError( r, __LINE__, __FILE__ )
26 #define __testForError(x,l,f) testForError(x,l,_S(f))
27 _LIT( KErrorFailString, "Test failed with error %d");
28 inline void testForError( TInt aCode, TInt aLine, const TText* aFileName )
30 if( aCode != KErrNone )
32 test.Printf( KErrorFailString, aCode );
33 test.operator()( EFalse, aLine, aFileName );
37 #define TEST_FOR_MATCH( r, m ) __testForMatch( (TUint)(r), (TUint)(m), __LINE__, __FILE__ )
38 #define __testForMatch(r,m,l,f) testForMatch(r,m,l,_S(f))
39 _LIT( KMatchFailString, "Test failed, expected %d; got %d");
40 inline void testForMatch( TUint aValue, TUint aExpected, TInt aLine, const TText* aFileName )
42 if( aValue != aExpected )
44 test.Printf( KMatchFailString, aExpected, aValue );
45 test.operator()( EFalse, aLine, aFileName );