baseapitest/basesvs/validation/f32/sfsrv/scripts/PBASE-F32-File-PublicApi-NAND.script
author Slion
Tue, 08 Dec 2009 08:11:42 +0100
branchanywhere
changeset 19 f6d3d9676ee4
parent 0 a41df078684a
child 15 4122176ea935
permissions -rw-r--r--
Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.

//
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of the License "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//
//! 	@file
//! 	@SYMTestSuiteName		PBASE-F32-File-PublicApi-NAND
//!	@SYMScriptTestEnvironment	This test script requires a Pagged ROM.
//!                             So tests has to be run on Pagged ROM.This tests is good tests only on H/w on which the memory is pagaed.
//!                             On emulator these tests will not return proper value/so it can be ignored.
//! 	@SYMScriptCreationDate		27/08/2007
//! 	@SYMScriptDescription		The test script contains API tests for the following functions of RFile class:
//!	TInt BlockMap(SBlockMapInfo &aInfo, TInt64 &aStartPos, TInt64 aEndPos=-1, TInt aBlockMapusage=EBlockMapUsagePaging) const;


LOAD_SUITE	T_SfSrv
DELAY		1000


//
// BlockMap
//


START_TESTCASE 			PBASE-F32-File-PublicApi-6001
//! @SYMTestCaseID		PBASE-F32-File-PublicApi-6001
//! @SYMAPI			RFile
//! @SYMTestCaseDesc		Function BlockMap() test, replace a file and then call BlockMap() on it to get the block/cluster Information
//!				Uses API elements: Open(), BlockMap().
//! @SYMTestActions		1. Create RFs session.
//!				2. Call RFile::Replace() 
//!				4. Call RFile::BlockMap().
//!				5. Close RFile.
//!				6. Delete file.
//!				7. Close RFs.
//!
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults	The tests returns KErrNotSupported on the Rom which is unpaged. On the pagged rom this tests will return 
//!  KErrCompletion if the end of the file is reached.                     
//!
//! @SYMTestType		CIT
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-File-PublicApi.ini
		CREATE_OBJECT	RFs	RFs1
		CREATE_OBJECT	RFile	file
		COMMAND			RFs1	new		
		COMMAND			RFs1	Connect		
		COMMAND			file	new		
		COMMAND			file	Open		PBASE-F32-File-PublicApi-6001-001-Replace_command003
		COMMAND		!Error=-17	file	BlockMap PBASE-F32-File-PublicApi-6001-001-BlockMap_command003
		COMMAND			file	Close		
		COMMAND			file	~	
		COMMAND			RFs1	~		
	END_TEST_BLOCK	
END_TESTCASE 		PBASE-F32-File-PublicApi-6001


START_TESTCASE 			PBASE-F32-File-PublicApi-6002
//! @SYMTestCaseID		PBASE-F32-File-PublicApi-6002
//! @SYMAPI			RFile
//! @SYMTestCaseDesc		Function BlockMap() test. Call BlockMap with Usage ETestDebug
//!				Uses API elements: Open(), BlockMap().
//! @SYMTestActions		1. Create RFs session.
//!				2. Call RFile::Replace() to create file tc0002 with EFileWrite 
//!				4. Call RFile::BlockMap() passing EBlockMapUsagePaging for usage, 0 for startPos.
//!				5. Close RFile.
//!				6. Delete file.
//!				7. Close RFs.
//!
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults	The tests returns KErrNotSupported on the Rom which is unpaged. On the pagged rom this tests will return 
//!  KErrCompletion if the end of the file is reached.
//!
//! @SYMTestType		CIT
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-File-PublicApi.ini
		CREATE_OBJECT	RFs	RFs1
		CREATE_OBJECT	RFile	file
		COMMAND			RFs1	new		
		COMMAND			RFs1	Connect		
		COMMAND			file	new		
		COMMAND			file	Open	PBASE-F32-File-PublicApi-6002-001-Replace_command003
		COMMAND	!Error=-17	file	BlockMap	PBASE-F32-File-PublicApi-6002-001-BlockMap_command004
		COMMAND			file	Close		
		COMMAND			file	~	
		COMMAND			RFs1	~		
	END_TEST_BLOCK	
END_TESTCASE 		PBASE-F32-File-PublicApi-6002