|
1 /* |
|
2 * Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: FSQ Test DLL |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __CPPUNIT_ASSERT_FAILURE_H |
|
21 #define __CPPUNIT_ASSERT_FAILURE_H |
|
22 |
|
23 #include <e32base.h> |
|
24 |
|
25 _LIT8(KCppUnitUnknownFilename, "-unknown-"); |
|
26 const TInt KCppUnitUnknownLineNumber=(-1); |
|
27 |
|
28 |
|
29 class CAssertFailure : public CBase |
|
30 { |
|
31 public: |
|
32 |
|
33 static CAssertFailure* NewL (const TDesC8& aMessage, |
|
34 TInt aLineNumber=KCppUnitUnknownLineNumber, |
|
35 const TDesC8& aFileName=KCppUnitUnknownFilename); |
|
36 |
|
37 static CAssertFailure* NewLC (const TDesC8& aMessage, |
|
38 TInt aLineNumber=KCppUnitUnknownLineNumber, |
|
39 const TDesC8& aFileName=KCppUnitUnknownFilename); |
|
40 |
|
41 static CAssertFailure* NewL (CAssertFailure& aAssertFailure); |
|
42 |
|
43 static CAssertFailure* NewLC (CAssertFailure& aAssertFailure); |
|
44 |
|
45 ~CAssertFailure (); |
|
46 |
|
47 const TDesC8& What() const; |
|
48 TInt LineNumber() const; |
|
49 const TDesC8& FileName() const; |
|
50 |
|
51 void SetMyHeapCellCount (TInt aHeapCellCount); |
|
52 TInt MyHeapCellCount (); |
|
53 |
|
54 private: |
|
55 |
|
56 CAssertFailure (); |
|
57 CAssertFailure (TInt aLineNumber); |
|
58 void ConstructL (const TDesC8& aMessage, const TDesC8& aFileName); |
|
59 void ConstructL (CAssertFailure& aAssertFailure); |
|
60 |
|
61 HBufC8* iMessage; |
|
62 TInt iLineNumber; |
|
63 HBufC8* iFileName; |
|
64 TInt iMyHeapCellCount; |
|
65 }; |
|
66 |
|
67 #endif |
|
68 |