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