1 /* |
1 /* |
2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
18 |
18 |
19 |
19 |
20 #include "TAGMA.H" |
20 #include "TAGMA.H" |
21 #include <txtfrmat.h> |
21 #include <txtfrmat.h> |
22 #include <e32test.h> |
22 #include <e32test.h> |
|
23 #include "tformat.h" |
23 |
24 |
24 #define UNUSED_VAR(a) a = a |
25 #define UNUSED_VAR(a) a = a |
25 |
26 |
26 CTrapCleanup* TrapCleanup; |
27 namespace LocalToTFormat |
27 RTest test(_L("TFormat - TTmCharFormat and CTmParFormat")); |
28 { |
|
29 CTFormatStep* TestStep = NULL; |
|
30 #define TESTPOINT(p) TestStep->testpoint(p,(TText8*)__FILE__,__LINE__) |
|
31 #define TESTPRINT(p) TestStep->print(p,(TText8*)__FILE__,__LINE__) |
|
32 } |
|
33 using namespace LocalToTFormat; |
28 |
34 |
29 void INC041190() |
35 void INC041190() |
30 { |
36 { |
31 TTmCharFormat tmcf; |
37 TTmCharFormat tmcf; |
32 TCharFormat cf; |
38 TCharFormat cf; |
33 cf.iFontPresentation.iHighlightStyle |
39 cf.iFontPresentation.iHighlightStyle |
34 = TFontPresentation::EFontHighlightNoMatchesIndicator; |
40 = TFontPresentation::EFontHighlightNoMatchesIndicator; |
35 tmcf.iEffects = 0; |
41 tmcf.iEffects = 0; |
36 tmcf = cf; |
42 tmcf = cf; |
37 test(tmcf.iEffects == TTmCharFormat::ENoMatchesIndicator); |
43 TESTPOINT(tmcf.iEffects == TTmCharFormat::ENoMatchesIndicator); |
38 cf.iFontPresentation.iHighlightStyle |
44 cf.iFontPresentation.iHighlightStyle |
39 = TFontPresentation::EFontHighlightNone; |
45 = TFontPresentation::EFontHighlightNone; |
40 tmcf.GetTCharFormat(cf); |
46 tmcf.GetTCharFormat(cf); |
41 test(cf.iFontPresentation.iHighlightStyle |
47 TESTPOINT(cf.iFontPresentation.iHighlightStyle |
42 == TFontPresentation::EFontHighlightNoMatchesIndicator); |
48 == TFontPresentation::EFontHighlightNoMatchesIndicator); |
43 } |
49 } |
44 |
50 |
45 void RunTestsL() |
51 TVerdict CTFormatStep::doTestStepL() |
46 { |
52 { |
|
53 SetTestStepResult(EPass); |
|
54 TestStep = this; |
|
55 TESTPRINT(_L("TFormat - TTmCharFormat and CTmParFormat")); |
|
56 |
47 __UHEAP_MARK; |
57 __UHEAP_MARK; |
48 |
58 |
49 test.Title(); |
59 TESTPRINT(_L(" @SYMTestCaseID:SYSLIB-FORM-LEGACY-TFORMAT-0001 INC041190 - EText's EFontHighlightNoMatchesIndicator isn't mappd to anythng in TTmCharFormat ")); |
50 test.Start(_L(" @SYMTestCaseID:SYSLIB-FORM-LEGACY-TFORMAT-0001 INC041190 - EText's EFontHighlightNoMatchesIndicator isn't mappd to anythng in TTmCharFormat ")); |
|
51 INC041190(); |
60 INC041190(); |
52 |
61 |
53 test.End(); |
|
54 test.Close(); |
|
55 |
|
56 __UHEAP_MARKENDC(0); |
62 __UHEAP_MARKENDC(0); |
|
63 return TestStepResult(); |
57 } |
64 } |
58 |
65 |
59 TInt E32Main() |
|
60 { |
|
61 TrapCleanup = CTrapCleanup::New(); |
|
62 TRAPD(err, RunTestsL()); |
|
63 test(err == KErrNone); |
|
64 delete TrapCleanup; |
|
65 return 0; |
|
66 } |
|