os/ossrv/stdcpp/tsrc/BC/apps/BCException/src/BCExceptionBlocks.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/stdcpp/tsrc/BC/apps/BCException/src/BCExceptionBlocks.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,165 @@
     1.4 +/*
     1.5 +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:       
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +// [INCLUDE FILES] - do not remove
    1.23 +#include <e32svr.h>
    1.24 +#include <StifParser.h>
    1.25 +#include <Stiftestinterface.h>
    1.26 +#include "BCException.h"
    1.27 +
    1.28 +//Headers exported from exceptions API
    1.29 +//#include <stl_rvct.h>
    1.30 +//#include <exception.h>
    1.31 +//#include <stdexcept>
    1.32 +#include <exception>
    1.33 +//#include <_range_errors.h>
    1.34 +//#include <_exception.h>
    1.35 +
    1.36 +// EXTERNAL DATA STRUCTURES
    1.37 +//extern  ?external_data;
    1.38 +
    1.39 +// EXTERNAL FUNCTION PROTOTYPES  
    1.40 +//extern ?external_function( ?arg_type,?arg_type );
    1.41 +
    1.42 +// CONSTANTS
    1.43 +//const ?type ?constant_var = ?constant;
    1.44 +
    1.45 +// MACROS
    1.46 +//#define ?macro ?macro_def
    1.47 +
    1.48 +// LOCAL CONSTANTS AND MACROS
    1.49 +//const ?type ?constant_var = ?constant;
    1.50 +//#define ?macro_name ?macro_def
    1.51 +
    1.52 +// MODULE DATA STRUCTURES
    1.53 +//enum ?declaration
    1.54 +//typedef ?declaration
    1.55 +
    1.56 +// LOCAL FUNCTION PROTOTYPES
    1.57 +//?type ?function_name( ?arg_type, ?arg_type );
    1.58 +
    1.59 +// FORWARD DECLARATIONS
    1.60 +//class ?FORWARD_CLASSNAME;
    1.61 +
    1.62 +// ============================= LOCAL FUNCTIONS ===============================
    1.63 +
    1.64 +// -----------------------------------------------------------------------------
    1.65 +// ?function_name ?description.
    1.66 +// ?description
    1.67 +// Returns: ?value_1: ?description
    1.68 +//          ?value_n: ?description_line1
    1.69 +//                    ?description_line2
    1.70 +// -----------------------------------------------------------------------------
    1.71 +//
    1.72 +/*
    1.73 +?type ?function_name(
    1.74 +    ?arg_type arg,  // ?description
    1.75 +    ?arg_type arg)  // ?description
    1.76 +    {
    1.77 +
    1.78 +    ?code  // ?comment
    1.79 +
    1.80 +    // ?comment
    1.81 +    ?code
    1.82 +    }
    1.83 +*/
    1.84 +
    1.85 +// ============================ MEMBER FUNCTIONS ===============================
    1.86 +
    1.87 +// -----------------------------------------------------------------------------
    1.88 +// CBCException::Delete
    1.89 +// Delete here all resources allocated and opened from test methods. 
    1.90 +// Called from destructor. 
    1.91 +// -----------------------------------------------------------------------------
    1.92 +//
    1.93 +void CBCException::Delete() 
    1.94 +    {
    1.95 +
    1.96 +    }
    1.97 +
    1.98 +// -----------------------------------------------------------------------------
    1.99 +// CBCException::RunMethodL
   1.100 +// Run specified method. Contains also table of test mothods and their names.
   1.101 +// -----------------------------------------------------------------------------
   1.102 +//
   1.103 +TInt CBCException::RunMethodL( 
   1.104 +    CStifItemParser& aItem ) 
   1.105 +    {
   1.106 +
   1.107 +    static TStifFunctionInfo const KFunctions[] =
   1.108 +        {  
   1.109 +        // Copy this line for every implemented function.
   1.110 +        // First string is the function name used in TestScripter script file.
   1.111 +        // Second is the actual implementation member function. 
   1.112 +        ENTRY( "TestAPI", CBCException::TestAPI ),
   1.113 +        //ADD NEW ENTRY HERE
   1.114 +        // [test cases entries] - Do not remove
   1.115 +
   1.116 +        };
   1.117 +
   1.118 +    const TInt count = sizeof( KFunctions ) / 
   1.119 +                        sizeof( TStifFunctionInfo );
   1.120 +
   1.121 +    return RunInternalL( KFunctions, count, aItem );
   1.122 +
   1.123 +    }
   1.124 +
   1.125 +// -----------------------------------------------------------------------------
   1.126 +// CBCException::TestAPI
   1.127 +// TestAPI test method function.
   1.128 +// (other items were commented in a header).
   1.129 +// -----------------------------------------------------------------------------
   1.130 +//
   1.131 +TInt CBCException::TestAPI( CStifItemParser& aItem )
   1.132 +    {
   1.133 +
   1.134 +    // Print to UI
   1.135 +    _LIT( KBCException, "BCException" );
   1.136 +    _LIT( KTestAPI, "In TestAPI" );
   1.137 +    TestModuleIf().Printf( 0, KBCException, KTestAPI );
   1.138 +    // Print to log file
   1.139 +    iLog->Log( KTestAPI );
   1.140 +
   1.141 +		_LIT( KResult, "No functions to be tested");
   1.142 +		_LIT( KComment, "Exceptions API has passed");
   1.143 +    TestModuleIf().Printf( 0, KResult, KComment);
   1.144 +
   1.145 +    return KErrNone;
   1.146 +
   1.147 +    }
   1.148 +
   1.149 +// -----------------------------------------------------------------------------
   1.150 +// CBCException::?member_function
   1.151 +// ?implementation_description
   1.152 +// (other items were commented in a header).
   1.153 +// -----------------------------------------------------------------------------
   1.154 +//
   1.155 +/*
   1.156 +TInt CBCException::?member_function(
   1.157 +   CItemParser& aItem )
   1.158 +   {
   1.159 +
   1.160 +   ?code
   1.161 +
   1.162 +   }
   1.163 +*/
   1.164 +
   1.165 +// ========================== OTHER EXPORTED FUNCTIONS =========================
   1.166 +// None
   1.167 +
   1.168 +//  [End of File] - Do not remove