os/ossrv/stdcpp/tsrc/BC/apps/BCOpenCHeaders/src/BCOpenCHeadersBlocks.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/BCOpenCHeaders/src/BCOpenCHeadersBlocks.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,201 @@
     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 "BCOpenCHeaders.h"
    1.27 +
    1.28 +//Headers exported from Open C headers API
    1.29 +#include <cstdlib>
    1.30 +#include <stdlib.h>
    1.31 +#include <cctype>
    1.32 +#include <csignal>
    1.33 +#include <cwctype>
    1.34 +#include <cstdio>
    1.35 +#include <stddef.h>
    1.36 +#include <cstddef>
    1.37 +#include <setjmp.h>
    1.38 +#include <string.h>
    1.39 +#include <wchar.h>
    1.40 +#include <cwchar>
    1.41 +#include <clocale>
    1.42 +#include <cstdarg>
    1.43 +#include <cctype>
    1.44 +#include <csetjmp>
    1.45 +#include <math.h>
    1.46 +#include <cstdlib>
    1.47 +#include <climits>
    1.48 +#include <csignal>
    1.49 +#include <cwctype>
    1.50 +#include <ctime>
    1.51 +#include <cstddef>
    1.52 +#include <locale.h>
    1.53 +#include <ctime>
    1.54 +#include <time.h>
    1.55 +#include <cerrno>
    1.56 +#include <cstdarg>
    1.57 +#include <csetjmp>
    1.58 +#include <cstring>
    1.59 +#include <stdio.h>
    1.60 +#include <wctype.h>
    1.61 +#include <cmath>
    1.62 +#include <cassert>
    1.63 +#include <ctype.h>
    1.64 +#include <stdarg.h>
    1.65 +#include <cerrno>
    1.66 +#include <cstdio>
    1.67 +#include <cstring>
    1.68 +#include <clocale>
    1.69 +#include <cwchar>
    1.70 +#include <cfloat>
    1.71 +
    1.72 +// EXTERNAL DATA STRUCTURES
    1.73 +//extern  ?external_data;
    1.74 +
    1.75 +// EXTERNAL FUNCTION PROTOTYPES  
    1.76 +//extern ?external_function( ?arg_type,?arg_type );
    1.77 +
    1.78 +// CONSTANTS
    1.79 +//const ?type ?constant_var = ?constant;
    1.80 +
    1.81 +// MACROS
    1.82 +//#define ?macro ?macro_def
    1.83 +
    1.84 +// LOCAL CONSTANTS AND MACROS
    1.85 +//const ?type ?constant_var = ?constant;
    1.86 +//#define ?macro_name ?macro_def
    1.87 +
    1.88 +// MODULE DATA STRUCTURES
    1.89 +//enum ?declaration
    1.90 +//typedef ?declaration
    1.91 +
    1.92 +// LOCAL FUNCTION PROTOTYPES
    1.93 +//?type ?function_name( ?arg_type, ?arg_type );
    1.94 +
    1.95 +// FORWARD DECLARATIONS
    1.96 +//class ?FORWARD_CLASSNAME;
    1.97 +
    1.98 +// ============================= LOCAL FUNCTIONS ===============================
    1.99 +
   1.100 +// -----------------------------------------------------------------------------
   1.101 +// ?function_name ?description.
   1.102 +// ?description
   1.103 +// Returns: ?value_1: ?description
   1.104 +//          ?value_n: ?description_line1
   1.105 +//                    ?description_line2
   1.106 +// -----------------------------------------------------------------------------
   1.107 +//
   1.108 +/*
   1.109 +?type ?function_name(
   1.110 +    ?arg_type arg,  // ?description
   1.111 +    ?arg_type arg)  // ?description
   1.112 +    {
   1.113 +
   1.114 +    ?code  // ?comment
   1.115 +
   1.116 +    // ?comment
   1.117 +    ?code
   1.118 +    }
   1.119 +*/
   1.120 +
   1.121 +// ============================ MEMBER FUNCTIONS ===============================
   1.122 +
   1.123 +// -----------------------------------------------------------------------------
   1.124 +// CBCOpenCHeaders::Delete
   1.125 +// Delete here all resources allocated and opened from test methods. 
   1.126 +// Called from destructor. 
   1.127 +// -----------------------------------------------------------------------------
   1.128 +//
   1.129 +void CBCOpenCHeaders::Delete() 
   1.130 +    {
   1.131 +
   1.132 +    }
   1.133 +
   1.134 +// -----------------------------------------------------------------------------
   1.135 +// CBCOpenCHeaders::RunMethodL
   1.136 +// Run specified method. Contains also table of test mothods and their names.
   1.137 +// -----------------------------------------------------------------------------
   1.138 +//
   1.139 +TInt CBCOpenCHeaders::RunMethodL( 
   1.140 +    CStifItemParser& aItem ) 
   1.141 +    {
   1.142 +
   1.143 +    static TStifFunctionInfo const KFunctions[] =
   1.144 +        {  
   1.145 +        // Copy this line for every implemented function.
   1.146 +        // First string is the function name used in TestScripter script file.
   1.147 +        // Second is the actual implementation member function. 
   1.148 +        ENTRY( "TestAPI", CBCOpenCHeaders::TestAPI ),
   1.149 +        //ADD NEW ENTRY HERE
   1.150 +        // [test cases entries] - Do not remove
   1.151 +
   1.152 +        };
   1.153 +
   1.154 +    const TInt count = sizeof( KFunctions ) / 
   1.155 +                        sizeof( TStifFunctionInfo );
   1.156 +
   1.157 +    return RunInternalL( KFunctions, count, aItem );
   1.158 +
   1.159 +    }
   1.160 +
   1.161 +// -----------------------------------------------------------------------------
   1.162 +// CBCOpenCHeaders::TestAPI
   1.163 +// TestAPI test method function.
   1.164 +// (other items were commented in a header).
   1.165 +// -----------------------------------------------------------------------------
   1.166 +//
   1.167 +TInt CBCOpenCHeaders::TestAPI( CStifItemParser& aItem )
   1.168 +    {
   1.169 +
   1.170 +    // Print to UI
   1.171 +    _LIT( KBCOpenCHeaders, "BCOpenCHeaders" );
   1.172 +    _LIT( KTestAPI, "In TestAPI" );
   1.173 +    TestModuleIf().Printf( 0, KBCOpenCHeaders, KTestAPI );
   1.174 +    // Print to log file
   1.175 +    iLog->Log( KTestAPI );
   1.176 +
   1.177 +		_LIT( KResult, "No functions to be tested");
   1.178 +		_LIT( KComment, "Open C Headers API has passed");
   1.179 +    TestModuleIf().Printf( 0, KResult, KComment);
   1.180 +
   1.181 +    return KErrNone;
   1.182 +
   1.183 +    }
   1.184 +
   1.185 +// -----------------------------------------------------------------------------
   1.186 +// CBCOpenCHeaders::?member_function
   1.187 +// ?implementation_description
   1.188 +// (other items were commented in a header).
   1.189 +// -----------------------------------------------------------------------------
   1.190 +//
   1.191 +/*
   1.192 +TInt CBCOpenCHeaders::?member_function(
   1.193 +   CItemParser& aItem )
   1.194 +   {
   1.195 +
   1.196 +   ?code
   1.197 +
   1.198 +   }
   1.199 +*/
   1.200 +
   1.201 +// ========================== OTHER EXPORTED FUNCTIONS =========================
   1.202 +// None
   1.203 +
   1.204 +//  [End of File] - Do not remove