persistentstorage/sqlite3api/TEST/sqliteTestUtl.cpp
author hgs
Tue, 19 Oct 2010 16:26:13 +0100
changeset 55 44f437012c90
parent 40 b8bdbc8f59c7
permissions -rw-r--r--
201041_01
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
55
44f437012c90 201041_01
hgs
parents: 40
diff changeset
     1
// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
0
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     2
// All rights reserved.
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     3
// This component and the accompanying materials are made available
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     5
// which accompanies this distribution, and is available
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     7
//
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     8
// Initial Contributors:
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    10
//
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    11
// Contributors:
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    12
//
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    13
// Description:
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    14
//
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    15
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    16
#include <e32test.h>
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
#include <e32debug.h>
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    18
#include <f32file.h>
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    19
#include "sqliteTestUtl.h"
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    20
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    21
static TBuf8<500> TheBuf8;
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    22
static TBuf16<500> TheBuf16;
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    23
40
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    24
static RTest* TheTest;
0
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    25
40
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    26
extern "C" void TestOpen(const char* title)
0
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    27
	{
40
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    28
	TPtrC8 p((const unsigned char*)title);
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    29
	TheBuf16.Copy(p);
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    30
	TheTest = new RTest(TheBuf16);
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    31
	}
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    32
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    33
extern "C" void TestTitle()
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    34
	{
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    35
	TheTest->Title();
0
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    36
	}
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    37
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    38
extern "C" void TestStart(const char* title)
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    39
	{
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    40
	TPtrC8 p((const unsigned char*)title);
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    41
	TheBuf16.Copy(p);
40
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    42
	TheTest->Start(TheBuf16);
0
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    43
	}
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    44
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    45
extern "C" void TestNext(const char* title)
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    46
	{
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    47
	TPtrC8 p((const unsigned char*)title);
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    48
	TheBuf16.Copy(p);
40
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    49
	TheTest->Next(TheBuf16);
0
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    50
	}
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    51
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    52
extern "C" void TestClose(void)
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    53
	{
40
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    54
	TheTest->Close();
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    55
	delete TheTest;	
0
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    56
	}
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    57
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    58
extern "C" void TestEnd(void)
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    59
	{
40
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    60
	TheTest->End();	
0
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    61
	}
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    62
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    63
extern "C" void TestAbort(int aLine)
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    64
	{
40
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    65
	TheTest->operator()(0, aLine);	
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    66
	}
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    67
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    68
extern "C" void TestTestLine(int aResult, int aLine)
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    69
	{
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    70
	TheTest->operator()(aResult, aLine);
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    71
	}
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    72
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    73
extern "C" void TestTest(int aResult)
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    74
	{
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    75
	TheTest->operator()(aResult);
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    76
	}
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    77
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    78
extern "C" void TestPrintf(const char* title)
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    79
	{
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    80
	TPtrC8 p((const unsigned char*)title);
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    81
	TheBuf16.Copy(p);
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
    82
	TheTest->Printf(TheBuf16);
0
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    83
	}
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    84
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    85
extern "C" void TestHeapMark(void)
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    86
	{
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    87
	__UHEAP_MARK;
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    88
	}
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    89
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    90
extern "C" void TestHeapMarkEnd(void)
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    91
	{
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    92
	__UHEAP_MARKEND;
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    93
	}
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    94
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    95
extern "C" void Print(const char* msg)
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    96
	{
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    97
	TPtrC8 p((const unsigned char*)msg);
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    98
	TheBuf16.Copy(p);
55
44f437012c90 201041_01
hgs
parents: 40
diff changeset
    99
	TheTest->Printf(TheBuf16);
0
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   100
	}
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   101
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   102
extern "C" void PrintI(const char* fmt, int a1)
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   103
	{
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   104
	TPtrC8 p((const unsigned char*)fmt);
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   105
	TheBuf16.Copy(p);
55
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   106
	TheTest->Printf(TheBuf16, a1);
0
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   107
	}
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   108
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   109
extern "C" void PrintIII(const char* fmt, int a1, int a2, int a3)
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   110
	{
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   111
	TPtrC8 p((const unsigned char*)fmt);
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   112
	TheBuf16.Copy(p);
55
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   113
	TheTest->Printf(TheBuf16, a1, a2, a3);
0
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   114
	}
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   115
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   116
extern "C" void PrintII64I64(const char* fmt, int a1, __int64 a2, __int64 a3)
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   117
	{
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   118
	TPtrC8 p((const unsigned char*)fmt);
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   119
	TheBuf16.Copy(p);
55
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   120
	TheTest->Printf(TheBuf16, a1, a2, a3);
0
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   121
	}
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   122
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   123
extern "C" void PrintSI(const char* fmt, const char* s, int a1)
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   124
	{
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   125
	TPtrC8 p((const unsigned char*)fmt);
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   126
	TheBuf8.Format(TPtrC8((const TUint8*)fmt), s, a1);
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   127
	TheBuf16.Copy(TheBuf8);
55
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   128
	TheTest->Printf(TheBuf16);
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   129
	}
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   130
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   131
extern "C" void PrintS(const char* fmt, const char* s)
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   132
	{
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   133
	TPtrC8 p((const unsigned char*)fmt);
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   134
	TheBuf8.Format(TPtrC8((const TUint8*)fmt), s);
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   135
	TheBuf16.Copy(TheBuf8);
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   136
	TheTest->Printf(TheBuf16);
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   137
	}
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   138
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   139
extern "C" void ThreadPrint(const char* msg)
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   140
	{
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   141
	TPtrC8 p((const unsigned char*)msg);
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   142
	TheBuf16.Copy(p);
0
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   143
	RDebug::Print(TheBuf16);
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   144
	}
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   145
55
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   146
extern "C" void ThreadPrintI(const char* fmt, int a1)
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   147
	{
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   148
	TPtrC8 p((const unsigned char*)fmt);
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   149
	TheBuf16.Copy(p);
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   150
	RDebug::Print(TheBuf16, a1);
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   151
	}
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   152
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   153
extern "C" void ThreadPrintIII(const char* fmt, int a1, int a2, int a3)
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   154
	{
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   155
	TPtrC8 p((const unsigned char*)fmt);
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   156
	TheBuf16.Copy(p);
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   157
	RDebug::Print(TheBuf16, a1, a2, a3);
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   158
	}
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   159
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   160
extern "C" void ThreadPrintII64I64(const char* fmt, int a1, __int64 a2, __int64 a3)
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   161
	{
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   162
	TPtrC8 p((const unsigned char*)fmt);
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   163
	TheBuf16.Copy(p);
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   164
	RDebug::Print(TheBuf16, a1, a2, a3);
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   165
	}
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   166
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   167
extern "C" void ThreadPrintSI(const char* fmt, const char* s, int a1)
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   168
	{
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   169
	TPtrC8 p((const unsigned char*)fmt);
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   170
	TheBuf8.Format(TPtrC8((const TUint8*)fmt), s, a1);
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   171
	TheBuf16.Copy(TheBuf8);
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   172
	RDebug::Print(TheBuf16);
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   173
	}
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   174
44f437012c90 201041_01
hgs
parents: 40
diff changeset
   175
extern "C" void ThreadPrintS(const char* fmt, const char* s)
0
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   176
	{
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   177
	TPtrC8 p((const unsigned char*)fmt);
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   178
	TheBuf8.Format(TPtrC8((const TUint8*)fmt), s);
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   179
	TheBuf16.Copy(TheBuf8);
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   180
	RDebug::Print(TheBuf16);
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   181
	}
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   182
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   183
extern "C" void CreatePrivateDir(void)
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   184
	{
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   185
	RFs TheFs;
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   186
	TInt err = TheFs.Connect();
40
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
   187
	TheTest->operator()(err == KErrNone);
0
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   188
	err = TheFs.CreatePrivatePath(EDriveC);
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   189
	TheFs.Close();
40
b8bdbc8f59c7 201031_02
hgs
parents: 0
diff changeset
   190
	TheTest->operator()(err == KErrNone || err == KErrAlreadyExists);
0
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   191
	}
08ec8eefde2f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   192