equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2004-2009 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: |
|
15 * TFormat.cpp tests for TTmCharFormat and CTmParFormat |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #include "TAGMA.H" |
|
21 #include <txtfrmat.h> |
|
22 #include <e32test.h> |
|
23 |
|
24 #define UNUSED_VAR(a) a = a |
|
25 |
|
26 CTrapCleanup* TrapCleanup; |
|
27 RTest test(_L("TFormat - TTmCharFormat and CTmParFormat")); |
|
28 |
|
29 void INC041190() |
|
30 { |
|
31 TTmCharFormat tmcf; |
|
32 TCharFormat cf; |
|
33 cf.iFontPresentation.iHighlightStyle |
|
34 = TFontPresentation::EFontHighlightNoMatchesIndicator; |
|
35 tmcf.iEffects = 0; |
|
36 tmcf = cf; |
|
37 test(tmcf.iEffects == TTmCharFormat::ENoMatchesIndicator); |
|
38 cf.iFontPresentation.iHighlightStyle |
|
39 = TFontPresentation::EFontHighlightNone; |
|
40 tmcf.GetTCharFormat(cf); |
|
41 test(cf.iFontPresentation.iHighlightStyle |
|
42 == TFontPresentation::EFontHighlightNoMatchesIndicator); |
|
43 } |
|
44 |
|
45 void RunTestsL() |
|
46 { |
|
47 __UHEAP_MARK; |
|
48 |
|
49 test.Title(); |
|
50 test.Start(_L(" @SYMTestCaseID:SYSLIB-FORM-LEGACY-TFORMAT-0001 INC041190 - EText's EFontHighlightNoMatchesIndicator isn't mappd to anythng in TTmCharFormat ")); |
|
51 INC041190(); |
|
52 |
|
53 test.End(); |
|
54 test.Close(); |
|
55 |
|
56 __UHEAP_MARKENDC(0); |
|
57 } |
|
58 |
|
59 TInt E32Main() |
|
60 { |
|
61 TrapCleanup = CTrapCleanup::New(); |
|
62 TRAPD(err, RunTestsL()); |
|
63 test(err == KErrNone); |
|
64 delete TrapCleanup; |
|
65 return 0; |
|
66 } |