equal
deleted
inserted
replaced
13 // Description: |
13 // Description: |
14 // f32test\manager\t_romg.cpp |
14 // f32test\manager\t_romg.cpp |
15 // |
15 // |
16 // |
16 // |
17 |
17 |
|
18 #define __E32TEST_EXTENSION__ |
18 #include <f32file.h> |
19 #include <f32file.h> |
19 #include <e32test.h> |
20 #include <e32test.h> |
20 #include <e32rom.h> |
21 #include <e32rom.h> |
21 #include "..\server\t_server.h" |
22 #include "..\server\t_server.h" |
22 |
23 |
450 if (n.Right(1)==_L("\\")) |
451 if (n.Right(1)==_L("\\")) |
451 n.SetLength(n.Length()-1); |
452 n.SetLength(n.Length()-1); |
452 // |
453 // |
453 test.Next(_L("Create root mem dir")); |
454 test.Next(_L("Create root mem dir")); |
454 TRAPD(r,TheRootDir=CMemDir::NewL()); |
455 TRAPD(r,TheRootDir=CMemDir::NewL()); |
455 test(r==KErrNone); |
456 test_KErrNone(r); |
456 // |
457 // |
457 test.Next(_L("Load directory structure")); |
458 test.Next(_L("Load directory structure")); |
458 TheLevel=(-1); |
459 TheLevel=(-1); |
459 TRAP(r,TheRootDir->LoadDirL(n)); |
460 TRAP(r,TheRootDir->LoadDirL(n)); |
460 test(r==KErrNone); |
461 test_KErrNone(r); |
461 test(TheLevel==(-1)); |
462 test(TheLevel==(-1)); |
462 // |
463 // |
463 delete buf; |
464 delete buf; |
464 test.End(); |
465 test.End(); |
465 } |
466 } |
551 { |
552 { |
552 test.Printf(_L("Error: Cannot access %S"),&TheFileName); |
553 test.Printf(_L("Error: Cannot access %S"),&TheFileName); |
553 test.End(); |
554 test.End(); |
554 return; |
555 return; |
555 } |
556 } |
556 test(r==KErrNone || r==KErrNotFound); |
557 test_Value(r, r == KErrNone || r==KErrNotFound); |
557 // |
558 // |
558 test.Next(_L("Generating ROM image")); |
559 test.Next(_L("Generating ROM image")); |
559 TRAP(r,buildRomImageL()); |
560 TRAP(r,buildRomImageL()); |
560 test(r==KErrNone); |
561 test_KErrNone(r); |
561 // |
562 // |
562 test.Next(_L("Basing the rom image")); |
563 test.Next(_L("Basing the rom image")); |
563 baseRomImage(); |
564 baseRomImage(); |
564 // |
565 // |
565 TBuf<0x80> b=_L("Writing ROM file "); |
566 TBuf<0x80> b=_L("Writing ROM file "); |
566 b+=TheFileName; |
567 b+=TheFileName; |
567 test.Next(b); |
568 test.Next(b); |
568 r=TheFile.Replace(TheFs,TheFileName,EFileStream|EFileWrite); |
569 r=TheFile.Replace(TheFs,TheFileName,EFileStream|EFileWrite); |
569 test(r==KErrNone); |
570 test_KErrNone(r); |
570 writeRomImage(); |
571 writeRomImage(); |
571 TheFile.Close(); |
572 TheFile.Close(); |
572 delete TheRootDir; |
573 delete TheRootDir; |
573 |
574 |
574 test.End(); |
575 test.End(); |