camerasrv_plat/media_recorder_api/tsrc/src/camcTest_6.cpp
changeset 42 605672cc2a86
parent 0 9b3e960ffc8a
equal deleted inserted replaced
39:e80a5e3e883f 42:605672cc2a86
   184     TInt filesize;
   184     TInt filesize;
   185     RFs fsSession;
   185     RFs fsSession;
   186     fsSession.Connect();
   186     fsSession.Connect();
   187     TFileName fileName;
   187     TFileName fileName;
   188     AddDriveLetterToPath(_L("recordQCIF.3gp"),fileName);
   188     AddDriveLetterToPath(_L("recordQCIF.3gp"),fileName);
   189     TInt err = file.Open(fsSession,fileName,EFileShareAny);
   189     TInt err;
       
   190     if ( err = file.Open(fsSession,fileName,EFileShareAny) )
       
   191         {
       
   192         fsSession.Close();
       
   193         }
   190     assertTIntsEqualL( KErrNone, err );
   194     assertTIntsEqualL( KErrNone, err );
   191 
   195 
   192     err = file.Size(filesize);
   196     err = file.Size(filesize);
   193     file.Close();
   197     file.Close();
   194     fsSession.Close();
   198     fsSession.Close();
   908 
   912 
   909 MTest* CCamcTest_6::suiteL ()
   913 MTest* CCamcTest_6::suiteL ()
   910     {
   914     {
   911     // Always use NewL (Do not use NewLC) !!!
   915     // Always use NewL (Do not use NewLC) !!!
   912     CTestSuite *suite = CTestSuite::NewL(_L8("CCamcTest_6")); 
   916     CTestSuite *suite = CTestSuite::NewL(_L8("CCamcTest_6")); 
   913 
   917     CleanupStack::PushL( suite );
   914     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.PAUSEL_003"), &PauseL_003_L));
   918 
   915 
   919     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.PAUSEL_003"), &CCamcTest_6::PauseL_003_L));
   916     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETVIDEOFRAMESIZEL_005"), &SetVideoFrameSizeL_005_L));
   920 
   917 
   921     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETVIDEOFRAMESIZEL_005"), &CCamcTest_6::SetVideoFrameSizeL_005_L));
   918     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETAUDIOENABLEDL_005"), &SetAudioEnabledL_005_L));
   922 
   919 
   923     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETAUDIOENABLEDL_005"), &CCamcTest_6::SetAudioEnabledL_005_L));
   920     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETMAXCLIPSIZEL_006"), &SetMaxClipSizeL_006_L));
   924 
   921     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETMAXCLIPSIZEL_007"), &SetMaxClipSizeL_007_L));
   925     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETMAXCLIPSIZEL_006"), &CCamcTest_6::SetMaxClipSizeL_006_L));
       
   926     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETMAXCLIPSIZEL_007"), &CCamcTest_6::SetMaxClipSizeL_007_L));
   922 
   927 
   923     // Record_006, only to be tested on HW
   928     // Record_006, only to be tested on HW
   924     // Removed from MuDo tests
   929     // Removed from MuDo tests
   925 #if !( defined (__WINS__) || defined (__WINSCW__) )
   930 #if !( defined (__WINS__) || defined (__WINSCW__) )
   926 //    suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.RECORD_006"), &Record_006_L));
   931 //    suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.RECORD_006"), &CCamcTest_6::Record_006_L));
   927 #endif
   932 #endif
   928     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.RECORD_007"), &Record_007_L));
   933     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.RECORD_007"), &CCamcTest_6::Record_007_L));
   929 
   934 
   930     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.VIDEOTYPEL_001"), &VideoTypeL_001_L));
   935     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.VIDEOTYPEL_001"), &CCamcTest_6::VideoTypeL_001_L));
   931     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.VIDEOTYPEL_002"), &VideoTypeL_002_L));
   936     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.VIDEOTYPEL_002"), &CCamcTest_6::VideoTypeL_002_L));
   932     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.VIDEOTYPEL_003"), &VideoTypeL_003_L));
   937     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.VIDEOTYPEL_003"), &CCamcTest_6::VideoTypeL_003_L));
   933     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.VIDEOTYPEL_004"), &VideoTypeL_004_L));
   938     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.VIDEOTYPEL_004"), &CCamcTest_6::VideoTypeL_004_L));
   934    
   939    
   935 #ifdef __MPEG4_VIDEO_ENCODING
   940 #ifdef __MPEG4_VIDEO_ENCODING
   936     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.VIDEOTYPEL_005"), &VideoTypeL_005_L));
   941     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.VIDEOTYPEL_005"), &CCamcTest_6::VideoTypeL_005_L));
   937 #endif
   942 #endif
   938 
   943 
   939     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.AUDIOTYPEL_001"), &AudioTypeL_001_L));
   944     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.AUDIOTYPEL_001"), &CCamcTest_6::AudioTypeL_001_L));
   940     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.AUDIOTYPEL_002"), &AudioTypeL_002_L));
   945     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.AUDIOTYPEL_002"), &CCamcTest_6::AudioTypeL_002_L));
   941     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.AUDIOTYPEL_003"), &AudioTypeL_003_L));
   946     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.AUDIOTYPEL_003"), &CCamcTest_6::AudioTypeL_003_L));
   942  
   947  
   943     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETVIDEOTYPEL_005"), &SetVideoTypeL_005_L));
   948     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETVIDEOTYPEL_005"), &CCamcTest_6::SetVideoTypeL_005_L));
   944    
   949    
   945 #ifdef __MPEG4_VIDEO_ENCODING
   950 #ifdef __MPEG4_VIDEO_ENCODING
   946     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETVIDEOTYPEL_006"), &SetVideoTypeL_006_L));
   951     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETVIDEOTYPEL_006"), &CCamcTest_6::SetVideoTypeL_006_L));
   947 #endif
   952 #endif
   948     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETVIDEOTYPEL_007"), &SetVideoTypeL_007_L));
   953     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETVIDEOTYPEL_007"), &CCamcTest_6::SetVideoTypeL_007_L));
   949     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETVIDEOTYPEL_008"), &SetVideoTypeL_008_L));
   954     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETVIDEOTYPEL_008"), &CCamcTest_6::SetVideoTypeL_008_L));
   950 
   955 
   951 #ifdef MP4_FILE_FORMAT_SUPPORTED
   956 #ifdef MP4_FILE_FORMAT_SUPPORTED
   952 #if ((!defined __WINS__) || (!defined __WINSCW__)) // AAC supported only in HW
   957 #if ((!defined __WINS__) || (!defined __WINSCW__)) // AAC supported only in HW
   953     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETVIDEOTYPEL_009"), &SetVideoTypeL_009_L));
   958     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETVIDEOTYPEL_009"), &CCamcTest_6::SetVideoTypeL_009_L));
   954 #endif
   959 #endif
   955 #endif
   960 #endif
   956     
   961     
   957     
   962     
   958     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETAUDIOTYPEL_005"), &SetAudioTypeL_005_L));
   963     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETAUDIOTYPEL_005"), &CCamcTest_6::SetAudioTypeL_005_L));
   959     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETAUDIOTYPEL_007"), &SetAudioTypeL_007_L));   
   964     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETAUDIOTYPEL_007"), &CCamcTest_6::SetAudioTypeL_007_L));   
   960 
   965 
   961 #ifdef MP4_FILE_FORMAT_SUPPORTED
   966 #ifdef MP4_FILE_FORMAT_SUPPORTED
   962 #if ((!defined __WINS__) || (!defined __WINSCW__)) // AAC supported only in HW
   967 #if ((!defined __WINS__) || (!defined __WINSCW__)) // AAC supported only in HW
   963     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETAUDIOTYPEL_008"), &SetAudioTypeL_008_L));
   968     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.SETAUDIOTYPEL_008"), &CCamcTest_6::SetAudioTypeL_008_L));
   964 #endif
   969 #endif
   965 #endif
   970 #endif
   966 
   971 
   967     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.CONTROLLERIMPLEMENTATIONINFORMATIONL_001"), &ControllerImplementationInformationL_001_L));   
   972     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.CONTROLLERIMPLEMENTATIONINFORMATIONL_001"), &CCamcTest_6::ControllerImplementationInformationL_001_L));   
   968 #ifndef MP4_FILE_FORMAT_SUPPORTED
   973 #ifndef MP4_FILE_FORMAT_SUPPORTED
   969     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.CONTROLLERIMPLEMENTATIONINFORMATIONL_003"), &ControllerImplementationInformationL_003_L));   
   974     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.CONTROLLERIMPLEMENTATIONINFORMATIONL_003"), &CCamcTest_6::ControllerImplementationInformationL_003_L));   
   970 #else
   975 #else
   971     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.CONTROLLERIMPLEMENTATIONINFORMATIONL_004"), &ControllerImplementationInformationL_004_L));   
   976     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.CONTROLLERIMPLEMENTATIONINFORMATIONL_004"), &CCamcTest_6::ControllerImplementationInformationL_004_L));   
   972 #endif
   977 #endif
   973 
   978 
   974 #ifndef MP4_FILE_FORMAT_SUPPORTED
   979 #ifndef MP4_FILE_FORMAT_SUPPORTED
   975     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.MMFREGISTRATION_002"), &MMFRegistration_002_L));   
   980     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.MMFREGISTRATION_002"), &CCamcTest_6::MMFRegistration_002_L));   
   976     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.MMFREGISTRATION_003"), &MMFRegistration_003_L));   
   981     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.MMFREGISTRATION_003"), &CCamcTest_6::MMFRegistration_003_L));   
   977 #else
   982 #else
   978     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.MMFREGISTRATION_004"), &MMFRegistration_004_L));   
   983     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.MMFREGISTRATION_004"), &CCamcTest_6::MMFRegistration_004_L));   
   979     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.MMFREGISTRATION_005"), &MMFRegistration_005_L));   
   984     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.MMFREGISTRATION_005"), &CCamcTest_6::MMFRegistration_005_L));   
   980     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.MMFREGISTRATION_006"), &MMFRegistration_006_L));   
   985     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.MMFREGISTRATION_006"), &CCamcTest_6::MMFRegistration_006_L));   
   981 #endif
   986 #endif
   982 
   987 
   983     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.DURATIONL_001"), &DurationL_001_L));   
   988     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.DURATIONL_001"), &CCamcTest_6::DurationL_001_L));   
   984     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.DURATIONL_002"), &DurationL_002_L));   
   989     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.DURATIONL_002"), &CCamcTest_6::DurationL_002_L));   
   985     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.DURATIONL_003"), &DurationL_003_L));   
   990     suite->addTestL(CTestCaller<CCamcTest_6>::NewL(_L8("CAMC_API.DURATIONL_003"), &CCamcTest_6::DurationL_003_L));   
   986 
   991 
       
   992     CleanupStack::Pop( suite );
   987     return suite;
   993     return suite;
   988     }
   994     }
   989 
   995