datacommsserver/esockserver/test/TE_ESock/EsockTestSection18.cpp
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // This contains ESock Test cases from section 18
       
    15 // 
       
    16 //
       
    17 
       
    18 // EPOC includes
       
    19 #include <e32base.h>
       
    20 #include <in_sock.h>
       
    21 
       
    22 // Test system includes
       
    23 #include "EsockTestSection18.h"
       
    24 
       
    25 
       
    26 // Test step 18.1
       
    27 const TDesC& CEsockTest18_1::GetTestName()
       
    28 	{
       
    29 	// store the name of this test case
       
    30 	_LIT(ret,"Test18.1");
       
    31 	return ret;
       
    32 	}
       
    33 
       
    34 CEsockTest18_1::~CEsockTest18_1()
       
    35 	{
       
    36 	}
       
    37 
       
    38 enum TVerdict CEsockTest18_1::easyTestStepL()
       
    39 	{
       
    40 	const TIp6Addr KInet6AddrOne = {{{0xff,0xff,0x2f,0xfe,0,0,0,0,0,0,0,0,0,0,0,0}}};
       
    41 	TBuf<39> buf;
       
    42 	
       
    43 	// set IP address
       
    44 	TInetAddr addr(KInet6AddrOne, 5001);
       
    45 	
       
    46 	// check address has bben set correctly
       
    47 	addr.OutputWithScope(buf);
       
    48 	TESTL(buf==_L("ffff:2ffe::"));
       
    49 	
       
    50 	// check port number set correctly
       
    51 	TESTL(addr.Port()==5001);
       
    52 	
       
    53 	return EPass;
       
    54 	}
       
    55