--- a/charconvfw/fatfilenameconversionplugins/test/T_CP1253.CPP Tue Aug 31 17:01:26 2010 +0300
+++ b/charconvfw/fatfilenameconversionplugins/test/T_CP1253.CPP Wed Sep 01 12:39:40 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -16,20 +16,10 @@
*/
-#include "T_CP1253.h"
+#include <e32test.h>
#include <e32des8.h>
-#define test(cond) \
- { \
- TBool __bb = (cond); \
- TEST(__bb); \
- if (!__bb) \
- { \
- ERR_PRINTF1(_L("ERROR: Test Failed")); \
- User::Leave(1); \
- } \
- }
-
+LOCAL_D RTest test(_L("T_CP1253.exe"));
_LIT16(Uni_1, "\x0053\x0059\x004D\x0042\x0049\x0041\x004E\xFFFF\x20AC\x00E8\x017B");
_LIT8(CP1253_1, "\x53\x59\x4D\x42\x49\x41\x4E\x5F\x80\x5F\x5F");
@@ -50,7 +40,7 @@
@SYMTestActions Tests for conversions from/to Unicode, using a function pointer
@SYMTestExpectedResults Test must not fail
*/
-void CT_CP1253::TestL()
+void Test()
{
RLibrary lib;
@@ -102,9 +92,9 @@
lib.Close();
}
-void CT_CP1253::OOMTestL()
+void OOMTest()
{
- INFO_PRINTF1(_L("OOM testing"));
+ test.Next(_L("OOM testing"));
TInt err, tryCount = 0;
do
{
@@ -117,7 +107,7 @@
// Setting Heap failure for OOM test
__UHEAP_SETFAIL(RHeap::EDeterministic, ++tryCount);
- TRAP(err,TestL());
+ TRAP(err,Test());
__UHEAP_SETFAIL(RHeap::ENone, 0);
@@ -133,31 +123,30 @@
}while (err == KErrNoMemory);
test(err == KErrNone);
- INFO_PRINTF2(_L("- server succeeded at heap failure rate of %i\n"), tryCount);
+ test.Printf(_L("- server succeeded at heap failure rate of %i\n"), tryCount);
}
-CT_CP1253::CT_CP1253()
- {
- SetTestStepName(KTestStep_T_CP1253);
- }
-
+LOCAL_C void DoE32MainL()
+ {
+ Test();
+ OOMTest();
+ }
-TVerdict CT_CP1253::doTestStepL()
- {
- SetTestStepResult(EFail);
-
- __UHEAP_MARK;
+GLDEF_C TInt E32Main()
+ {
+ __UHEAP_MARK;
- TRAPD(error1, TestL());
- TRAPD(error2, OOMTestL());
+ test.Title();
+ test.Start(_L(" @SYMTestCaseID:SYSLIB-FATCHARSETCONV-CT-1786 CP1253 tests... "));
- __UHEAP_MARKEND;
+ CTrapCleanup* trapCleanup=CTrapCleanup::New();
+ TRAPD(error, DoE32MainL());
+ delete trapCleanup;
- if(error1 == KErrNone && error2 == KErrNone)
- {
- SetTestStepResult(EPass);
- }
+ test.End();
+ test.Close();
- return TestStepResult();
- }
+ __UHEAP_MARKEND;
+ return error;
+ }