/**
@SYMTestCaseID          SYSLIB-BAFL-CT-0488
@SYMTestCaseDesc        Tests for defect number DEF043985
@SYMTestPriority        High
@SYMTestActions         Tests that the table is invalid when creating an RString
                        Check for panic    
@SYMTestExpectedResults Tests must not fail
@SYMREQ                 REQ0000
*/
TInt RStringPoolPanicTest::DEF043985_StringTest_ThreadL(TAny*)
	{
	__UHEAP_MARK;

	RStringPool stringPool;
	stringPool.OpenL();

	// Create a table and make it so it passes some internal tests
	// for validity as we are testing a particular internal test
	TStringTable testTable;
	testTable.iCaseSensitive = ETrue;
	testTable.iCount = 1;

	// Test for Panic
	RString testString = stringPool.String(0, testTable);

	// Test should never get this far as it Panics

	testString.Close();
	stringPool.Close();

	__UHEAP_MARKEND;

	return KErrNone;		
	}
// ---------------------------------------------------------------------------
// TIRXMLElementFormat::CloseStringPoolL
// Closes the StringPool
// ---------------------------------------------------------------------------
//
void TIRXMLElementFormat::CloseStringPoolL( RStringPool&  aStringPool )
    {
    IRLOG_DEBUG( "TIRXMLElementFormat::CloseStringPoolL" );
    aStringPool.Close();
    IRLOG_DEBUG( "TIRXMLElementFormat::CloseStringPoolL - Exiting." );
    return;
    }    
/**
Subtest function

@SYMTestCaseID          SYSLIB-BAFL-CT-0490
@SYMTestCaseDesc        Tests for defect number DEF043985
@SYMTestPriority        High
@SYMTestActions         Tests that the table is invalid when creating a folded RString
@SYMTestExpectedResults Tests must not fail
@SYMREQ                 REQ0000
*/
void RStringPoolPanicTest::DEF043985_IndexTest_SubFunctionL()
	{
	__UHEAP_MARK;

	RStringPool stringPool;
	stringPool.OpenL();

	// Create a table and make it so it passes some internal tests
	// for validity as we are testing a particular internal test
	TStringTable testTable;
	testTable.iCaseSensitive = ETrue;
	testTable.iCount = 1;

	RString testString = stringPool.OpenStringL(KDummyString());
	CleanupClosePushL(testString);
	
	// Test for Panic
	testString.Index(testTable);
	
	// Test should never get this far as it Panics
	
	CleanupStack::PopAndDestroy(&testString);
	stringPool.Close();
	
	__UHEAP_MARKEND;
	}