diff -r a179b74831c9 -r c1f20ce4abcf kerneltest/e32test/buffer/t_match.cpp --- a/kerneltest/e32test/buffer/t_match.cpp Thu Aug 19 11:14:22 2010 +0300 +++ b/kerneltest/e32test/buffer/t_match.cpp Tue Aug 31 16:34:26 2010 +0300 @@ -76,47 +76,6 @@ #include "CompareImp.h" #include "u32std.h" -static inline TBool IsSupplementary(TUint aChar) -/** -@param aChar The 32-bit code point value of a Unicode character. - -@return True, if aChar is supplementary character; false, otherwise. -*/ - { - return (aChar > 0xFFFF); - } - -static inline TText16 GetHighSurrogate(TUint aChar) -/** -Retrieve the high surrogate of a supplementary character. - -@param aChar The 32-bit code point value of a Unicode character. - -@return High surrogate of aChar, if aChar is a supplementary character; - aChar itself, if aChar is not a supplementary character. - -@see TChar::GetLowSurrogate -*/ - { - return STATIC_CAST(TText16, 0xD7C0 + (aChar >> 10)); - } - -static inline TText16 GetLowSurrogate(TUint aChar) -/** -Retrieve the low surrogate of a supplementary character. - -@param aChar The 32-bit code point value of a Unicode character. - -@return Low surrogate of aChar, if aChar is a supplementary character; - zero, if aChar is not a supplementary character. - -@see TChar::GetHighSurrogate -*/ - { - return STATIC_CAST(TText16, 0xDC00 | (aChar & 0x3FF)); - } - - ///***************** copied from locale euser source code *********************** static const TCollationMethod TheCollationMethod[] = { @@ -1637,15 +1596,15 @@ TUint32 code; User::LeaveIfError(lex.Val(code, EHex)); lex.Assign(lex.NextToken()); - if (!IsSupplementary(code)) + if (!TChar::IsSupplementary(code)) { aStr[1+len] = (TUint16)code; } else { - aStr[1+len] = GetHighSurrogate(code); + aStr[1+len] = TChar::GetHighSurrogate(code); ++len; - aStr[1+len] = GetLowSurrogate(code); + aStr[1+len] = TChar::GetLowSurrogate(code); } } __ASSERT_ALWAYS(len > 0, User::Invariant()); @@ -1708,14 +1667,14 @@ { continue; } - if (!IsSupplementary(chCode)) + if (!TChar::IsSupplementary(chCode)) { candidate[KChPos] = (TUint16)chCode; } else { - candidate[KChPos] = GetHighSurrogate(chCode); - candidate[KChPos+1] = GetLowSurrogate(chCode); + candidate[KChPos] = TChar::GetHighSurrogate(chCode); + candidate[KChPos+1] = TChar::GetLowSurrogate(chCode); } //"Character decomposition mapping" is the 5th field, starting from 0. TPtrC8 decomp(GetUnicodeDataField(stmt, 5)); @@ -1762,16 +1721,16 @@ { continue; } - if (!IsSupplementary(chCode)) + if (!TChar::IsSupplementary(chCode)) { candidate[KChPos] = (TUint16)chCode; candidate.SetLength(2); } else { - candidate[KChPos] = GetHighSurrogate(chCode); + candidate[KChPos] = TChar::GetHighSurrogate(chCode); candidate.SetLength(3); - candidate[KChPos+1] = GetLowSurrogate(chCode); + candidate[KChPos+1] = TChar::GetLowSurrogate(chCode); } //"Character decomposition mapping" is the 5th field, starting from 0. TPtrC8 decomp(GetUnicodeDataField(stmt, 5)); @@ -2554,7 +2513,10 @@ test.Next(_L("MatchSurrogate")); for (ii=0;ii