kerneltest/f32test/server/t_fsrv.cpp
changeset 44 36bfc973b146
parent 43 96e5fb8b040d
child 109 b3a1d9898418
child 175 5af6c74cd793
equal deleted inserted replaced
43:96e5fb8b040d 44:36bfc973b146
   150 		test.Printf(_L("DualDensity "));
   150 		test.Printf(_L("DualDensity "));
   151 	if (anInfo.iMediaAtt&KMediaAttFormattable)
   151 	if (anInfo.iMediaAtt&KMediaAttFormattable)
   152 		test.Printf(_L("Formattable "));
   152 		test.Printf(_L("Formattable "));
   153 	if (anInfo.iMediaAtt&KMediaAttWriteProtected)
   153 	if (anInfo.iMediaAtt&KMediaAttWriteProtected)
   154 		test.Printf(_L("WProtected "));
   154 		test.Printf(_L("WProtected "));
   155 	test.Printf(_L("\n   BATTERY="));
   155 	test.Printf(_L("\n   CONNECTION BUS="));
   156 	switch(anInfo.iBattery)
   156 	switch(anInfo.iConnectionBusType)
   157 		{
   157 		{
   158 	case EBatNotSupported: test.Printf(_L("Not supported\n")); break;
   158 	case EConnectionBusInternal: test.Printf(_L("Internal\n")); break;
   159 	case EBatGood: test.Printf(_L("Good\n")); break;
   159 	case EConnectionBusUsb: test.Printf(_L("USB\n")); break;
   160 	case EBatLow: test.Printf(_L("Low\n")); break;
       
   161 	default:
   160 	default:
   162 		test.Printf(_L("Unknown value\n"));
   161 		test.Printf(_L("Unknown value\n"));
   163 		}
   162 		}
   164 	test.Printf(_L("   MEDIA="));
   163 	test.Printf(_L("   MEDIA="));
   165 	switch(anInfo.iType)
   164 	switch(anInfo.iType)
   283 //
   282 //
   284 // Test the drive info is reasonable
   283 // Test the drive info is reasonable
   285 //
   284 //
   286 	{
   285 	{
   287 
   286 
   288 	test(anInfo.iBattery==EBatLow || anInfo.iBattery==EBatGood || anInfo.iBattery==EBatNotSupported);
   287 	test(anInfo.iConnectionBusType==EConnectionBusInternal || anInfo.iConnectionBusType==EConnectionBusUsb);
   289 	
   288 	
   290 	if (aDrive==EDriveZ)
   289 	if (aDrive==EDriveZ)
   291 		{
   290 		{
   292 		if (anInfo.iType==EMediaNotPresent)
   291 		if (anInfo.iType==EMediaNotPresent)
   293 			return;
   292 			return;
  1132 	test(n==gSessionPath);
  1131 	test(n==gSessionPath);
  1133 	TVolumeInfo w;
  1132 	TVolumeInfo w;
  1134 	r=TheFs.Volume(w,EDriveO);
  1133 	r=TheFs.Volume(w,EDriveO);
  1135 	test(r==KErrNone);
  1134 	test(r==KErrNone);
  1136 	test(w.iDrive.iType==v.iDrive.iType);
  1135 	test(w.iDrive.iType==v.iDrive.iType);
  1137 	test(w.iDrive.iBattery==v.iDrive.iBattery);
  1136 	test(w.iDrive.iConnectionBusType==v.iDrive.iConnectionBusType);
  1138 	test(w.iDrive.iDriveAtt==KDriveAttSubsted);
  1137 	test(w.iDrive.iDriveAtt==KDriveAttSubsted);
  1139 	test(w.iDrive.iMediaAtt==v.iDrive.iMediaAtt);
  1138 	test(w.iDrive.iMediaAtt==v.iDrive.iMediaAtt);
  1140 	test(w.iUniqueID==v.iUniqueID);
  1139 	test(w.iUniqueID==v.iUniqueID);
  1141 	test(w.iSize==v.iSize);
  1140 	test(w.iSize==v.iSize);
  1142 	test(w.iFree==v.iFree);
  1141 	test(w.iFree==v.iFree);
  1149 	r=TheFs.Drive(d,EDriveO);
  1148 	r=TheFs.Drive(d,EDriveO);
  1150 	test(r==KErrNone);
  1149 	test(r==KErrNone);
  1151 	test(d.iDriveAtt==KDriveAttSubsted);
  1150 	test(d.iDriveAtt==KDriveAttSubsted);
  1152 	test(d.iMediaAtt==origDI.iMediaAtt);
  1151 	test(d.iMediaAtt==origDI.iMediaAtt);
  1153 	test(d.iType==origDI.iType);
  1152 	test(d.iType==origDI.iType);
  1154 	test(d.iBattery==origDI.iBattery);
  1153 	test(d.iConnectionBusType==origDI.iConnectionBusType);
  1155 
  1154 
  1156 
  1155 
  1157 	test.Next(_L("Test real name"));
  1156 	test.Next(_L("Test real name"));
  1158 	r=TheFs.RealName(_L("O:\\FILE.XXX"),n);
  1157 	r=TheFs.RealName(_L("O:\\FILE.XXX"),n);
  1159 	test(r==KErrNone);
  1158 	test(r==KErrNone);