|
1 // |
|
2 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 // All rights reserved. |
|
4 // This component and the accompanying materials are made available |
|
5 // under the terms of "Eclipse Public License v1.0" |
|
6 // which accompanies this distribution, and is available |
|
7 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 // |
|
9 // Initial Contributors: |
|
10 // Nokia Corporation - initial contribution. |
|
11 // |
|
12 // Contributors: |
|
13 // |
|
14 // Description: |
|
15 // |
|
16 /////////////////////////////////////////////////////////////////////////////// |
|
17 //! @file |
|
18 //! @SYMTestSuiteName T_BTUserAPI |
|
19 //! @SYMScriptTestEnvironment This test script requires a basic ROM with bluetooth dongle. |
|
20 //! @SYMScriptDescription Tests all public elements of the TL2CAPSockAddr class |
|
21 //! as a means of confidence that the API works as expected. |
|
22 //! The purpose is to provide a regression test suite of PublishedAll APIs for |
|
23 //! BT USER related classes. |
|
24 //! Negative testing is performed to confirm that correct errors are returned |
|
25 //! when incorrect parameters are given. The tests are fully automated. |
|
26 //! @SYMAuthor Ting Yen |
|
27 //! @SYMCreationDate 20/03/2007 |
|
28 /////////////////////////////////////////////////////////////////////////////// |
|
29 |
|
30 RUN_UTILS MkDir ${SYSDRIVE}\bluetooth\ |
|
31 RUN_UTILS MkDir ${SYSDRIVE}\bluetooth\user\ |
|
32 |
|
33 LOAD_SUITE T_BTUserAPI |
|
34 DELAY 500 |
|
35 |
|
36 |
|
37 // **************************************************************************** |
|
38 // TL2CAPSockAddr |
|
39 // **************************************************************************** |
|
40 |
|
41 START_TESTCASE BT-USER-L2CapSockAddr-PublicApi-4001 |
|
42 //! @SYMTestCaseID BT-USER-L2CapSockAddr-PublicApi-4001 |
|
43 //! @SYMAPI TL2CAPSockAddr |
|
44 //! @SYMTestCaseDesc Create a TL2CAPSockAddr object |
|
45 //! Uses API elements: TL2CAPSockAddr() |
|
46 //! @SYMTestActions Create a new empty TL2CAPSockAddr object |
|
47 //! |
|
48 //! @SYMTestStatus Implemented |
|
49 //! @SYMTestPriority Low |
|
50 //! @SYMTestExpectedResults object created |
|
51 //! @SYMTestType CIT |
|
52 |
|
53 START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-L2CapSockAddr-PublicApi.ini |
|
54 CREATE_OBJECT TL2CAPSockAddr TL2CAPSockAddrData |
|
55 COMMAND TL2CAPSockAddrData TL2CAPSockAddr |
|
56 END_TEST_BLOCK |
|
57 |
|
58 END_TESTCASE BT-USER-L2CapSockAddr-PublicApi-4001 |
|
59 |
|
60 |
|
61 START_TESTCASE BT-USER-L2CapSockAddr-PublicApi-4002 |
|
62 //! @SYMTestCaseID BT-USER-L2CapSockAddr-PublicApi-4002 |
|
63 //! @SYMAPI TL2CAPSockAddr and TSockAddr |
|
64 //! @SYMTestCaseDesc Create a TL2CAPSockAddr object |
|
65 //! Uses API elements: TL2CAPSockAddr::TL2CAPSockAddr() and TSockAddr::TSockAddr() |
|
66 //! @SYMTestActions 1. Create a new empty TSockAddr object |
|
67 //! 2. Create a new empty TL2CAPSockAddr object from a TSockAddr object |
|
68 //! |
|
69 //! @SYMTestStatus Implemented |
|
70 //! @SYMTestPriority Low |
|
71 //! @SYMTestExpectedResults object created |
|
72 //! @SYMTestType CIT |
|
73 |
|
74 START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-L2CapSockAddr-PublicApi.ini |
|
75 CREATE_OBJECT TSockAddr TSockAddrData |
|
76 CREATE_OBJECT TL2CAPSockAddr TL2CAPSockAddrData |
|
77 COMMAND TSockAddrData Construct |
|
78 COMMAND TL2CAPSockAddrData TL2CAPSockAddr BT-USER-L2CapSockAddr-PublicApi-0002-0001command4TL2CAPSockAddr |
|
79 END_TEST_BLOCK |
|
80 |
|
81 END_TESTCASE BT-USER-L2CapSockAddr-PublicApi-4002 |
|
82 |
|
83 |
|
84 START_TESTCASE BT-USER-L2CapSockAddr-PublicApi-4003 |
|
85 //! @SYMTestCaseID BT-USER-L2CapSockAddr-PublicApi-4003 |
|
86 //! @SYMAPI TL2CAPSockAddr and TSockAddr |
|
87 //! @SYMTestCaseDesc Utility function to downcast a TSockAddr to a TL2CAPSockAddr |
|
88 //! Uses API elements: TSockAddr::TSockAddr() and TL2CAPSockAddr::Cast() |
|
89 //! @SYMTestActions 1. Create a new empty TSockAddr object |
|
90 //! 2. Cast the TSockAddr object to a TL2CAPSockAddr object |
|
91 //! |
|
92 //! @SYMTestStatus Implemented |
|
93 //! @SYMTestPriority Low |
|
94 //! @SYMTestExpectedResults TL2CAPSockAddr object created by cast |
|
95 //! @SYMTestType CIT |
|
96 |
|
97 START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-L2CapSockAddr-PublicApi.ini |
|
98 CREATE_OBJECT TSockAddr TSockAddrData |
|
99 CREATE_OBJECT TL2CAPSockAddr TL2CAPSockAddrData |
|
100 COMMAND TSockAddrData Construct |
|
101 COMMAND TL2CAPSockAddrData Cast BT-USER-L2CapSockAddr-PublicApi-0003-0001command4Cast |
|
102 END_TEST_BLOCK |
|
103 |
|
104 END_TESTCASE BT-USER-L2CapSockAddr-PublicApi-4003 |
|
105 |
|
106 START_TESTCASE BT-USER-L2CapSockAddr-PublicApi-4004 |
|
107 //! @SYMTestCaseID BT-USER-L2CapSockAddr-PublicApi-4004 |
|
108 //! @SYMAPI TL2CAPSockAddr |
|
109 //! @SYMTestCaseDesc Set and get the port of an TL2CAPSockAddr |
|
110 //! Uses API elements: TL2CAPSockAddr(), SetPort() and Port() |
|
111 //! @SYMTestActions 1. Create a new empty TL2CAPSockAddr object |
|
112 //! 2. Set the TL2CAPSockAddr port value (decimal 55) |
|
113 //! 3. Get the TL2CAPSockAddr port value (decimal 55) |
|
114 //! |
|
115 //! @SYMTestStatus Implemented |
|
116 //! @SYMTestPriority Low |
|
117 //! @SYMTestExpectedResults TL2CAPSockAddr port value has been set and TL2CAPSockAddr port value returned |
|
118 //! @SYMTestType CIT |
|
119 |
|
120 START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-L2CapSockAddr-PublicApi.ini |
|
121 CREATE_OBJECT TL2CAPSockAddr TL2CAPSockAddrData |
|
122 COMMAND TL2CAPSockAddrData TL2CAPSockAddr |
|
123 COMMAND TL2CAPSockAddrData SetPort BT-USER-L2CapSockAddr-PublicApi-0004-0001command2SetPort |
|
124 COMMAND TL2CAPSockAddrData Port BT-USER-L2CapSockAddr-PublicApi-0004-0001command3Port |
|
125 END_TEST_BLOCK |
|
126 |
|
127 END_TESTCASE BT-USER-L2CapSockAddr-PublicApi-4004 |
|
128 |
|
129 DELAY 2000 |