1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/stdcpp/tsrc/BC/apps/BCCSRuntimeSup/src/BCCSRuntimeSupBlocks.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,168 @@
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 <string>
1.27 +#include "BCCSRuntimeSup.h"
1.28 +
1.29 +//Headers exported from Compiler specific runtime support API
1.30 +//#include <stl\_config.h>
1.31 +#include <runtime\numeric>
1.32 +#include <runtime\typeinfo>
1.33 +#include <runtime\new>
1.34 +//#include <runtime\new.h>
1.35 +//#include <runtime\exception.h>
1.36 +
1.37 +//#include <runtime\typeinfo.h>
1.38 +
1.39 +// EXTERNAL DATA STRUCTURES
1.40 +//extern ?external_data;
1.41 +
1.42 +// EXTERNAL FUNCTION PROTOTYPES
1.43 +//extern ?external_function( ?arg_type,?arg_type );
1.44 +
1.45 +// CONSTANTS
1.46 +//const ?type ?constant_var = ?constant;
1.47 +
1.48 +// MACROS
1.49 +//#define ?macro ?macro_def
1.50 +
1.51 +// LOCAL CONSTANTS AND MACROS
1.52 +//const ?type ?constant_var = ?constant;
1.53 +//#define ?macro_name ?macro_def
1.54 +
1.55 +// MODULE DATA STRUCTURES
1.56 +//enum ?declaration
1.57 +//typedef ?declaration
1.58 +
1.59 +// LOCAL FUNCTION PROTOTYPES
1.60 +//?type ?function_name( ?arg_type, ?arg_type );
1.61 +
1.62 +// FORWARD DECLARATIONS
1.63 +//class ?FORWARD_CLASSNAME;
1.64 +
1.65 +// ============================= LOCAL FUNCTIONS ===============================
1.66 +
1.67 +// -----------------------------------------------------------------------------
1.68 +// ?function_name ?description.
1.69 +// ?description
1.70 +// Returns: ?value_1: ?description
1.71 +// ?value_n: ?description_line1
1.72 +// ?description_line2
1.73 +// -----------------------------------------------------------------------------
1.74 +//
1.75 +/*
1.76 +?type ?function_name(
1.77 + ?arg_type arg, // ?description
1.78 + ?arg_type arg) // ?description
1.79 + {
1.80 +
1.81 + ?code // ?comment
1.82 +
1.83 + // ?comment
1.84 + ?code
1.85 + }
1.86 +*/
1.87 +
1.88 +// ============================ MEMBER FUNCTIONS ===============================
1.89 +
1.90 +// -----------------------------------------------------------------------------
1.91 +// CBCCSRuntimeSup::Delete
1.92 +// Delete here all resources allocated and opened from test methods.
1.93 +// Called from destructor.
1.94 +// -----------------------------------------------------------------------------
1.95 +//
1.96 +void CBCCSRuntimeSup::Delete()
1.97 + {
1.98 +
1.99 + }
1.100 +
1.101 +// -----------------------------------------------------------------------------
1.102 +// CBCCSRuntimeSup::RunMethodL
1.103 +// Run specified method. Contains also table of test mothods and their names.
1.104 +// -----------------------------------------------------------------------------
1.105 +//
1.106 +TInt CBCCSRuntimeSup::RunMethodL(
1.107 + CStifItemParser& aItem )
1.108 + {
1.109 +
1.110 + static TStifFunctionInfo const KFunctions[] =
1.111 + {
1.112 + // Copy this line for every implemented function.
1.113 + // First string is the function name used in TestScripter script file.
1.114 + // Second is the actual implementation member function.
1.115 + ENTRY( "TestAPI", CBCCSRuntimeSup::TestAPI ),
1.116 + //ADD NEW ENTRY HERE
1.117 + // [test cases entries] - Do not remove
1.118 +
1.119 + };
1.120 +
1.121 + const TInt count = sizeof( KFunctions ) /
1.122 + sizeof( TStifFunctionInfo );
1.123 +
1.124 + return RunInternalL( KFunctions, count, aItem );
1.125 +
1.126 + }
1.127 +
1.128 +// -----------------------------------------------------------------------------
1.129 +// CBCCSRuntimeSup::TestAPI
1.130 +// TestAPI test method function.
1.131 +// (other items were commented in a header).
1.132 +// -----------------------------------------------------------------------------
1.133 +//
1.134 +TInt CBCCSRuntimeSup::TestAPI( CStifItemParser& aItem )
1.135 + {
1.136 +
1.137 + // Print to UI
1.138 + _LIT( KBCCSRuntimeSup, "BCCSRuntimeSup" );
1.139 + _LIT( KTestAPI, "In TestAPI" );
1.140 + TestModuleIf().Printf( 0, KBCCSRuntimeSup, KTestAPI );
1.141 + // Print to log file
1.142 + iLog->Log( KTestAPI );
1.143 +
1.144 + _LIT( KResult, "No functions to be tested");
1.145 + _LIT( KComment, "Compiler specific runtime support API has passed");
1.146 + TestModuleIf().Printf( 0, KResult, KComment);
1.147 +
1.148 + return KErrNone;
1.149 +
1.150 + }
1.151 +
1.152 +// -----------------------------------------------------------------------------
1.153 +// CBCCSRuntimeSup::?member_function
1.154 +// ?implementation_description
1.155 +// (other items were commented in a header).
1.156 +// -----------------------------------------------------------------------------
1.157 +//
1.158 +/*
1.159 +TInt CBCCSRuntimeSup::?member_function(
1.160 + CItemParser& aItem )
1.161 + {
1.162 +
1.163 + ?code
1.164 +
1.165 + }
1.166 +*/
1.167 +
1.168 +// ========================== OTHER EXPORTED FUNCTIONS =========================
1.169 +// None
1.170 +
1.171 +// [End of File] - Do not remove