1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 1998-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
903 test(err >= KErrNone); |
903 test(err >= KErrNone); |
904 |
904 |
905 RDbUpdate update; |
905 RDbUpdate update; |
906 err = update.Execute(TheDatabase, DMLinsert, EDbCompareNormal ); |
906 err = update.Execute(TheDatabase, DMLinsert, EDbCompareNormal ); |
907 if(err != KErrNone) |
907 if(err != KErrNone) |
908 RDebug::Printf("Error on Execute %d",err); |
908 test.Printf(_L("Error on Execute %d\r\n"), err); |
909 test2(err, KErrNone); |
909 test2(err, KErrNone); |
910 |
910 |
911 TInt rows = update.RowCount(); |
911 TInt rows = update.RowCount(); |
912 RDebug::Printf("Afected rows %d",rows); |
912 test.Printf(_L("Afected rows %d\r\n") ,rows); |
913 test2(rows, 1); |
913 test2(rows, 1); |
914 update.Close(); |
914 update.Close(); |
915 |
915 |
916 err = TheDatabase.Commit(); |
916 err = TheDatabase.Commit(); |
917 test2(err, KErrNone); |
917 test2(err, KErrNone); |
935 const TInt KRowSize = 300; |
935 const TInt KRowSize = 300; |
936 const TInt KRealRowSize = 512; |
936 const TInt KRealRowSize = 512; |
937 |
937 |
938 RDbRow row; |
938 RDbRow row; |
939 row.CreateL(KRowSize); |
939 row.CreateL(KRowSize); |
940 RDebug::Printf("Rows %d %d",row.Size(), row.MaxSize() ); |
940 test.Printf(_L("Rows %d %d\r\n"), row.Size(), row.MaxSize()); |
941 test2(row.MaxSize(), KRealRowSize); |
941 test2(row.MaxSize(), KRealRowSize); |
942 TAny* rptr = row.First(); |
942 TAny* rptr = row.First(); |
943 |
943 |
944 RDbRow row2; |
944 RDbRow row2; |
945 row2.Open(rptr, KRowSize, 2*KRowSize); |
945 row2.Open(rptr, KRowSize, 2*KRowSize); |
946 RDebug::Printf("Row2s %d %d", KRowSize, row2.MaxSize()); |
946 test.Printf(_L("Row2s %d %d\r\n"), KRowSize, row2.MaxSize()); |
947 test2(row2.Size(), KRowSize); |
947 test2(row2.Size(), KRowSize); |
948 test2(row2.MaxSize(), 2*KRowSize); |
948 test2(row2.MaxSize(), 2*KRowSize); |
949 |
949 |
950 row.Close(); |
950 row.Close(); |
951 row2.Close(); |
951 row2.Close(); |
1049 test.Next(_L("Create SPD File from \"1133557A.txt\"")); |
1049 test.Next(_L("Create SPD File from \"1133557A.txt\"")); |
1050 commandParameter.Format(KCommandParameter, &KRomTxtFile4, &KTestSpdFile4); |
1050 commandParameter.Format(KCommandParameter, &KRomTxtFile4, &KTestSpdFile4); |
1051 ExecuteRemoteL(KCommand, commandParameter); |
1051 ExecuteRemoteL(KCommand, commandParameter); |
1052 |
1052 |
1053 #else |
1053 #else |
1054 RDebug::Print(_L("Testing SPConv - This test case cannot run on hardware")); |
1054 test.Printf(_L("Testing SPConv - This test case cannot run on hardware")); |
1055 #endif |
1055 #endif |
1056 |
1056 |
1057 test.Next(_L("End")); |
1057 test.Next(_L("End")); |
1058 test.End(); |
1058 test.End(); |
1059 } |
1059 } |
1275 c == TChar('_') || |
1275 c == TChar('_') || |
1276 c == TChar('-')) |
1276 c == TChar('-')) |
1277 { |
1277 { |
1278 // If the found name is other valid application name |
1278 // If the found name is other valid application name |
1279 // starting with aProcessName string. |
1279 // starting with aProcessName string. |
1280 //RDebug::Print(_L(":: Process name: \"%S\".\n"), &name); |
1280 //test.Printf(_L(":: Process name: \"%S\".\n"), &name); |
1281 continue; |
1281 continue; |
1282 } |
1282 } |
1283 } |
1283 } |
1284 RProcess proc; |
1284 RProcess proc; |
1285 if (proc.Open(name) == KErrNone) |
1285 if (proc.Open(name) == KErrNone) |
1286 { |
1286 { |
1287 proc.Kill(0); |
1287 proc.Kill(0); |
1288 //RDebug::Print(_L("\"%S\" process killed.\n"), &name); |
1288 //test.Printf(_L("\"%S\" process killed.\n"), &name); |
1289 } |
1289 } |
1290 proc.Close(); |
1290 proc.Close(); |
1291 } |
1291 } |
1292 } |
1292 } |
1293 void DoTests() |
1293 void DoTests() |