diff -r 000000000000 -r 2e3d3ce01487 filehandling/htmltorichtextconverter/tsrc/buffertest.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/filehandling/htmltorichtextconverter/tsrc/buffertest.cpp Tue Feb 02 10:12:00 2010 +0200 @@ -0,0 +1,260 @@ +// Copyright (c) 2003-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" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// BufferTest module +// compares unicode buffers obtained by +// (1)passing the entire narrow buffer to CCnvCharacterSetConverter::ConvertToUnicode +// (2)using CHtmlToCrtConvBuffer::ReadCharacterL +// +// + +#include +#include +#include "CHtmlToCrtConvBuffer.h" +#include + + +_LIT(KTestName,"bufferTest"); +_LIT(KTest1,"@SYMTestCaseID PIM-BUFFERTEST-0001 buffer test"); + +LOCAL_D RTest test(KTestName); + +void getCharacterSetL(TDesC8& aSource, RFs& aFs, CCnvCharacterSetConverter* aCnvCharacterSetConverter); +void convertBufferDirectlyL(TDesC8& aSource, TDes& aUnicode, CCnvCharacterSetConverter* aCnvCharacterSetConverter); +void convertBufferUsingCHtmlToCrtConvBufferL(TDesC8& aSource, TDes& aUnicode, RFs& aFs, CCnvCharacterSetConverter* aCnvCharacterSetConverter); +bool doComparisonL(TDes8& aSource, RFs& aFs, CCnvCharacterSetConverter* aCnvCharacterSetConverter); +void comparisonForVariousCharsetsL(RFs& aFs, CCnvCharacterSetConverter* aCnvCharacterSetConverter); + +//========================================================================================= + +/** +@SYMTestCaseID PIM-BUFFERTEST-0001 +*/ +void doMainL() + { + test.Start(KTest1); + + RFs fs; + User::LeaveIfError(fs.Connect()); + CleanupClosePushL(fs); + CCnvCharacterSetConverter* cnvCharacterSetConverter=CCnvCharacterSetConverter::NewLC(); + + comparisonForVariousCharsetsL(fs, cnvCharacterSetConverter); + + CleanupStack::PopAndDestroy(2); //cnvCharacterSetConverter, fs + + test.End(); + test.Close(); + } + +//========================================================================================= + +GLDEF_C TInt E32Main() + { + __UHEAP_MARK; + + CTrapCleanup* theCleanup=CTrapCleanup::New(); + TRAPD(ret,doMainL()); + test(ret==KErrNone); + delete theCleanup; + + __UHEAP_MARKEND; + return(KErrNone); + } +//========================================================================================= +//getCharacterSetL +//========================================================================================= +void getCharacterSetL(TDesC8& aSource, RFs& aFs, CCnvCharacterSetConverter* aCnvCharacterSetConverter) + { + CArrayFix* arrayOfCharacterSetsAvailable=CCnvCharacterSetConverter::CreateArrayOfCharacterSetsAvailableLC(aFs); + TInt confidence; + TUint characterSetIdentifier; + + aCnvCharacterSetConverter->AutoDetectCharacterSetL(confidence, characterSetIdentifier, *arrayOfCharacterSetsAvailable, aSource); + aCnvCharacterSetConverter->PrepareToConvertToOrFromL(characterSetIdentifier, *arrayOfCharacterSetsAvailable, aFs); + CleanupStack::PopAndDestroy(arrayOfCharacterSetsAvailable); + } +//========================================================================================= +//convertBufferDirectlyL +//========================================================================================= +void convertBufferDirectlyL(TDesC8& aSource, TDes& aUnicode, CCnvCharacterSetConverter* aCnvCharacterSetConverter) + { + TInt state=CCnvCharacterSetConverter::KStateDefault; + TInt returnValue=aCnvCharacterSetConverter->ConvertToUnicode(aUnicode, aSource, state); + + //return value is 0 if entire buffer converted + if(returnValue!=0) + User::Leave(KErrGeneral); + } +//========================================================================================= +//convertBufferUsingCHtmlToCrtConvBufferL +//========================================================================================= +void convertBufferUsingCHtmlToCrtConvBufferL(TDesC8& aSource, TDes& aUnicode, RFs& aFs, CCnvCharacterSetConverter* aCnvCharacterSetConverter) + { + //write source buffer to source file for passing to CHtmlToCrtConvBuffer::NewL() + _LIT(KSourceFile,"c:\\source file"); + TBufC<15> sourceFile=KSourceFile(); + RFile source; + User::LeaveIfError(source.Replace(aFs, sourceFile, EFileWrite)); + test(source.Write(aSource)==KErrNone); + source.Close(); + + CHtmlToCrtConvBuffer* buffer=CHtmlToCrtConvBuffer::NewL(sourceFile, aFs, *aCnvCharacterSetConverter); + CleanupStack::PushL(buffer); + + TChar character; + TInt position=0; + TBool endOfBuffer=EFalse; + while(buffer->ReadCharacterL(character, position, endOfBuffer)) + { + aUnicode.Append(character); + } + + CleanupStack::PopAndDestroy(buffer); + } +//========================================================================================= +//doComparisonL +//========================================================================================= +bool doComparisonL(TDes8& aSource, RFs& aFs, CCnvCharacterSetConverter* aCnvCharacterSetConverter) + { + TBuf<512> directUnicode; + TBuf<512> bufferUnicode; + + getCharacterSetL(aSource, aFs, aCnvCharacterSetConverter); + convertBufferDirectlyL(aSource, directUnicode, aCnvCharacterSetConverter); + convertBufferUsingCHtmlToCrtConvBufferL(aSource, bufferUnicode, aFs, aCnvCharacterSetConverter); + + //compare the two buffers + return (directUnicode.Compare(bufferUnicode)==0); + } +//========================================================================================= +//comparisonForVariousCharsetsL +//========================================================================================= +void comparisonForVariousCharsetsL(RFs& aFs, CCnvCharacterSetConverter* aCnvCharacterSetConverter) + { + _LIT8(KSJISPhrase, "\x81@\x81y\x83o\x83\x93\x83R\x83N\x82Q\x82T\x93\xfa\x81\x81\x89\xaa\x93""c\x8e\xa0\x8ds\x81z\x83\x84\x83\x93\x83S\x83\x93\x82\xa9\x82\xe7\x82\xcc\x8f\xee\x95\xf1\x82\xc9\x82\xe6\x82\xe9\x82\xc6\x81""A\x83~\x83\x83\x83\x93\x83}\x81[\x82\xcc\x96\xaf\x8e\xe5\x89\xbb\x89^\x93\xae\x8ew\x93\xb1\x8e\xd2\x83""A\x83""E\x83\x93\x81""E\x83T\x83\x93\x81""E\x83X\x81[\x81""E\x83`\x81[\x82\xb3\x82\xf1\x82\xe7\x8d\x91\x96\xaf\x96\xaf\x8e\xe5\x98""A\x96\xbf\x81i\x82m\x82k\x82""c\x81j\x82\xcc\x83\x81\x83\x93\x83o\x81[\x82\xaa\x93\xf1\x8f\\x8el\x93\xfa\x81""A\x8e\xd4\x82\xc5\x83\x84\x83\x93\x83S\x83\x93\x8dx\x8aO\x82\xc9\x8fo\x82\xbd\x82\xc6\x82\xb1\x82\xeb\x81""A\x8cR\x90\xad\x93\x96\x8b\xc7\x82\xc9\x90\xa7\x8e~\x82\xb3\x82\xea\x82\xbd\x82\xbd\x82\xdf\x81""A\x93\xb9\x98H\x82\xed\x82\xab\x82\xc9\x88\xda\x82\xb3\x82\xea\x82\xbd\x8e\xd4\x93\xf1\x91\xe4\x82\xcc\x92\x86\x82\xc5\x82\xeb\x82\xa4\x8f\xe9\x82\xf0\x8en\x82\xdf\x82\xbd\x81""B\x83X\x81[\x81""E\x83`\x81[\x82\xb3\x82\xf1\x82\xaa\x81""A\x93\x96\x8b\xc7\x82\xcc\x8ds\x93\xae\x90\xa7\x8c\xc0\x82\xf0\x94j\x82\xc1\x82\xc4\x8dx\x8aO\x82\xc9\x8fo\x82\xbd\x82\xcc\x82\xcd\x8b\xe3\x94\xaa\x94N\x94\xaa\x8c\x8e\x88\xc8\x97\x88\x81""A\x93\xf1\x94N\x82\xd4\x82\xe8\x81""B\x96\xaf\x8e\xe5\x89\xbb\x89^\x93\xae\x82\xd6\x82\xcc\x8d\x91\x8d\xdb\x93I\x82\xc8\x8ex\x8e\x9d\x8fW\x82\xdf\x82\xf0\x91_\x82\xc1\x82\xc4\x92\xb7\x8a\xfa\x82\xeb\x82\xa4\x8f\xe9\x82\xf0\x8ds\x82\xa4\x89\xc2\x94\\x90\xab\x82\xe0\x82\xa0\x82\xe8\x81""A\x8cR\x90\xad\x91\xa4\x82\xcd\x91\xce\x89\x9e\x82\xc9\x8b\xea\x97\xb6\x82\xb5\x82\xc4\x82\xa2\x82\xe9\x81""B

"); + _LIT8(KBig5, "\xa1@\xa1@\xa5\xbb\xb3\xf8\xb0T\xa1]\xb0O\xaa\xcc\xb1\xe4\xd9y\xa1^\xac\xb0\xb3""e\xb9\xfd\xb8\xa8\xb9\xea\xa4\xa4\xa5\xa1\xa6\xe8\xb3\xa1\xa4j\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da\xa4\xea\xc2\xd8\xa4\xa8\xa4\xe9\xa4\xec\xa4\xeb\xa4\xe8\xa4\xa6\xa4\xcb\xa4\xb7\xa4\xbf\xa4\xe2\xa4\xce\xa1\xa2\xa4\xc8\xb9\xcd\xa4\xa8\xa4\xeb\xa4\xb3\xa4\xc8\xa4\xac\xa4\xc7\xa4\xad\xa4\xde\xa4\xb9\xa1\xa3\xa4\xc4\xa4\xde\xa4\xea\xa1\xa2""1\xa4\xc4\xa4\xce\xa5\xa6\xa5\xa3\xa5\xf3\xa5\xc9\xa5\xa6\xa5\xde\xa5\xcd\xa1\xbc\xa5\xb8\xa5\xe3\xa4\xca\xa4\xce\xa4\xcb\xa1\xa2Windows\xc9\xf7\xa4\xcb\xa4\xe2\xa1\xa2Mac\xc9\xf7\xa4\xcb\xa4\xe2\xa1\xa2\xa4\xb5\xa4\xde\xa4\xb6\xa4\xde\xa4\xcb\xa5\xab\xa5\xb9\xa5\xbf\xa5\xde\xa5\xa4\xa5\xba\xa4\xb9\xa4\xeb\xa4\xb3\xa4\xc8\xa4\xac\xa4\xc7\xa4\xad\xa4\xde\xa4\xb9\xa1\xa3"); + _LIT8(KSJIS, "\x82\xb1\x82\xcc\x83z\x81[\x83\x80\x83y\x81[\x83W\x82\xcd\x81""A\x82\xa9\x82\xed\x82\xa2\x82\xa2\x83L\x83\x83\x83\x89\x83N\x83^\x81[\x81g\x83s\x83\x93\x83O\x81[\x81h\x82\xf0\x82\xbd\x82\xad\x82\xb3\x82\xf1\x82\xcc\x90l\x82\xbd\x82\xbf\x82\xc9\x8f\xd0\x89\xee\x82\xb5\x81""A\x82\xdc\x82\xbd\x81""A\x8c\xf0\x97\xac\x82\xf0\x8e\x9d\x82\xc1\x82\xc4\x82\xa2\x82\xbd\x82\xbe\x82\xab\x82\xbd\x82\xa2\x82\xc6\x8ev\x82\xc1\x82\xc4\x8d\xec\x90\xac\x82\xb3\x82\xea\x82\xbd\x83y\x81[\x83W\x82\xc5\x82\xb7\x81""B\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\xd3\xd6\xbe\xa3\xac\xb6\xc1\xd5\xdf\xa3\xac\xc2\xdb\xcc\xb3\xa3\xac\xce\xc4\xd5\xaa\xa3\xac\xb1\xa8\xd6\xbd\xa3\xac\xd0\xa6\xbb\xb0\xa3\xac\xcc\xe5\xd3\xfd\xa3\xac\xc7\xe9\xb8\xd0\xa3\xac\xc1\xf4\xd1\xa7\xa3\xac\xbf\xe1\xd5\xbe\xa3\xac"); + _LIT8(GB2312Dhalf, "romance.cgi>\xc1\xb5\xc1\xb5\xb7\xe7\xb3\xbe"); + _LIT8(GB2312C, "\xa1\xa1\xa1\xf1\xcd\xf5\xbb\xdb\xa3\xa8\xb1\xbe\xb1\xa8\xcc\xd8\xd4\xbc\xa3\xa9\xb1\xb1\xbe\xa9\xb1\xa8\xb5\xc0

\xa1\xa1\xa1\xa1\xc0\xfa\xbd\xec\xb0\xc2\xd4\xcb\xbb\xe1\xca\xd7"); +//========================================================================================= + TBuf8<512> source; + + source=KSJISPhrase; + if(doComparisonL(source, aFs, aCnvCharacterSetConverter)) + test.Printf(_L("KSJISPhrase\n")); + else + User::Leave(KErrGeneral); + + source=KBig5; + if(doComparisonL(source, aFs, aCnvCharacterSetConverter)) + test.Printf(_L("KBig5\n")); + else + User::Leave(KErrGeneral); + + source=KBig52; + if(doComparisonL(source, aFs, aCnvCharacterSetConverter)) + test.Printf(_L("KBig52\n")); + else + User::Leave(KErrGeneral); + + source=KEUP; + if(doComparisonL(source, aFs, aCnvCharacterSetConverter)) + test.Printf(_L("KEUP\n")); + else + User::Leave(KErrGeneral); + + source=KEUC2; + if(doComparisonL(source, aFs, aCnvCharacterSetConverter)) + test.Printf(_L("KEUC2\n")); + else + User::Leave(KErrGeneral); + + source=KSJIS; + if(doComparisonL(source, aFs, aCnvCharacterSetConverter)) + test.Printf(_L("KSJIS\n")); + else + User::Leave(KErrGeneral); + + source=KISO2022; + if(doComparisonL(source, aFs, aCnvCharacterSetConverter)) + test.Printf(_L("KISO2022\n")); + else + User::Leave(KErrGeneral); + + source=KISO2022JP; + if(doComparisonL(source, aFs, aCnvCharacterSetConverter)) + test.Printf(_L("KISO2022JP\n")); + else + User::Leave(KErrGeneral); + + source=SJISNET; + if(doComparisonL(source, aFs, aCnvCharacterSetConverter)) + test.Printf(_L("SJISNET\n")); + else + User::Leave(KErrGeneral); + + source=GB2312; + if(doComparisonL(source, aFs, aCnvCharacterSetConverter)) + test.Printf(_L("GB2312\n")); + else + User::Leave(KErrGeneral); + + source=GB2312A; + if(doComparisonL(source, aFs, aCnvCharacterSetConverter)) + test.Printf(_L("GB2312A\n")); + else + User::Leave(KErrGeneral); + + source=BIG5A; + if(doComparisonL(source, aFs, aCnvCharacterSetConverter)) + test.Printf(_L("BIG5A\n")); + else + User::Leave(KErrGeneral); + + source=BIG5C; + if(doComparisonL(source, aFs, aCnvCharacterSetConverter)) + test.Printf(_L("BIG5C\n")); + else + User::Leave(KErrGeneral); + + source=GB2312B; + if(doComparisonL(source, aFs, aCnvCharacterSetConverter)) + test.Printf(_L("GB2312B\n")); + else + User::Leave(KErrGeneral); + + source=GB2312Dhalf; + if(doComparisonL(source, aFs, aCnvCharacterSetConverter)) + test.Printf(_L("GB2312Dhalf\n")); + else + User::Leave(KErrGeneral); + + source=GB2312C; + if(doComparisonL(source, aFs, aCnvCharacterSetConverter)) + test.Printf(_L("GB2312C\n")); + else + User::Leave(KErrGeneral); + } +//=========================================================================================