os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/scripts/Panics.script
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/scripts/Panics.script	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,134 @@
     1.4 +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// @file
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +//! @SYMTestSuiteName PDS-TEF-SQL-SUITE
    1.22 +//! @SYMScriptTestEnvironment TEF
    1.23 +//! @internalComponent
    1.24 +//! @test
    1.25 +
    1.26 +PRINT Run SQL Tests
    1.27 +
    1.28 +LOAD_SUITE te_SQL_Suite
    1.29 +
    1.30 +START_TESTCASE SYSLIB-SQL-CIT-1800
    1.31 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1800
    1.32 +//! @SYMTestCaseDesc  Attempt to use an RSqlStatement without an RSqlDatabase.
    1.33 +//! @SYMTestPriority  High
    1.34 +//! @SYMTestActions   See description and the config file.
    1.35 +//! @SYMTestExpectedResults
    1.36 +//!                  The test looks for specific panic codes generated
    1.37 +//!                  when the equivalent of programmer errors are executed
    1.38 +//!                  on the SQLite system. For example, attempting to use
    1.39 +//!                  an RSqlStatement object without an open RSqlDatabase.
    1.40 +//! @SYMREQ           REQ5792
    1.41 +	RUN_PANIC_STEP_RESULT 2 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini One-a
    1.42 +	RUN_PANIC_STEP_RESULT 2 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini One-b
    1.43 +	RUN_PANIC_STEP_RESULT 2 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini One-c
    1.44 +	RUN_PANIC_STEP_RESULT 2 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini One-d
    1.45 +	RUN_PANIC_STEP_RESULT 2 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini One-e
    1.46 +	RUN_PANIC_STEP_RESULT 2 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini One-f
    1.47 +	RUN_PANIC_STEP_RESULT 2 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini One-g
    1.48 +	RUN_PANIC_STEP_RESULT 2 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini One-h
    1.49 +	RUN_PANIC_STEP_RESULT 2 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini One-i
    1.50 +	RUN_PANIC_STEP_RESULT 2 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini One-j
    1.51 +END_TESTCASE SYSLIB-SQL-CIT-1800
    1.52 +
    1.53 +START_TESTCASE SYSLIB-SQL-CIT-1801
    1.54 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1801
    1.55 +//! @SYMTestCaseDesc  Attempt to use an RSqlDatabase that isn't open. First 
    1.56 +//!                  opens a valid database, immediately closes it and then
    1.57 +//!                  attempts to use an RSqlDatabase method.
    1.58 +//! @SYMTestPriority  High
    1.59 +//! @SYMTestActions   See description and the config file.
    1.60 +//! @SYMTestExpectedResults
    1.61 +//!                  Panics when an Exec or other RSqlDatabase method is
    1.62 +//!                  attempted.
    1.63 +//! @SYMREQ           REQ5792
    1.64 +	RUN_PANIC_STEP_RESULT 2 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini Two
    1.65 +	RUN_PANIC_STEP_RESULT 2 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini Two-b
    1.66 +	RUN_PANIC_STEP_RESULT 2 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini Two-c
    1.67 +	RUN_PANIC_STEP_RESULT 2 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini Two-d
    1.68 +	RUN_PANIC_STEP_RESULT 2 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini Two-e
    1.69 +	RUN_PANIC_STEP_RESULT 2 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini Two-f
    1.70 +	RUN_PANIC_STEP_RESULT 2 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini Two-g
    1.71 +END_TESTCASE SYSLIB-SQL-CIT-1801
    1.72 +
    1.73 +START_TESTCASE SYSLIB-SQL-CIT-1802
    1.74 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1802
    1.75 +//! @SYMTestCaseDesc  Attempt to use Column* calls following a failed Next.
    1.76 +//! @SYMTestPriority  High
    1.77 +//! @SYMTestActions   See description and the config file.
    1.78 +//! @SYMTestExpectedResults
    1.79 +//!                  The test looks for specific panic codes generated
    1.80 +//!                  when Column* methods are called after Next returns
    1.81 +//!                  'KSqlAtEnd'.
    1.82 +//! @SYMREQ           REQ5792
    1.83 +	RUN_PANIC_STEP_RESULT 130 USER 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini Three
    1.84 +	RUN_PANIC_STEP_RESULT 11 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini Three-b
    1.85 +	RUN_PANIC_STEP_RESULT 11 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini Three-c
    1.86 +	RUN_PANIC_STEP_RESULT 11 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini Three-d
    1.87 +	RUN_PANIC_STEP_RESULT 11 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini Three-e
    1.88 +	RUN_PANIC_STEP_RESULT 11 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini Three-f
    1.89 +	RUN_PANIC_STEP_RESULT 11 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini Three-g
    1.90 +	RUN_PANIC_STEP_RESULT 11 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini Three-h
    1.91 +	RUN_PANIC_STEP_RESULT 5 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini Three-i
    1.92 +END_TESTCASE SYSLIB-SQL-CIT-1802
    1.93 +
    1.94 +START_TESTCASE SYSLIB-SQL-CIT-1803
    1.95 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1803
    1.96 +//! @SYMTestCaseDesc  Use parameter and column indices which are out of bounds.
    1.97 +//! @SYMTestPriority  High
    1.98 +//! @SYMTestActions   See description and the config file.
    1.99 +//! @SYMTestExpectedResults
   1.100 +//!                  This test looks for specific panic codes generated
   1.101 +//!                  when Bind and Column methods are called with Parameter
   1.102 +//!                  and Column indices which are out of bounds.
   1.103 +//! @SYMREQ           REQ5792
   1.104 +	RUN_PANIC_STEP_RESULT 5 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini Four
   1.105 +	RUN_PANIC_STEP_RESULT 5 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini Four-b
   1.106 +	RUN_PANIC_STEP_RESULT 2 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini Four-c
   1.107 +END_TESTCASE SYSLIB-SQL-CIT-1803
   1.108 +
   1.109 +START_TESTCASE SYSLIB-SQL-CIT-1804
   1.110 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1804
   1.111 +//! @SYMTestCaseDesc  Attempt to read a cell in a table without selecting the
   1.112 +//!                  column.
   1.113 +//! @SYMTestPriority  High
   1.114 +//! @SYMTestActions   See description and the config file.
   1.115 +//! @SYMTestExpectedResults
   1.116 +//!                  The test looks for a specific panic code generated
   1.117 +//!                  when a Column* method is called on a column that hasn't
   1.118 +//!                  been selected.
   1.119 +//! @SYMREQ           REQ5792
   1.120 +	RUN_PANIC_STEP_RESULT 130 USER 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini Five
   1.121 +END_TESTCASE SYSLIB-SQL-CIT-1804
   1.122 +
   1.123 +START_TESTCASE SYSLIB-SQL-CIT-1805
   1.124 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1805
   1.125 +//! @SYMTestCaseDesc  Attempt to write, using Bind to a non-existent table.
   1.126 +//! @SYMTestPriority  High
   1.127 +//! @SYMTestActions   See description and the config file.
   1.128 +//! @SYMTestExpectedResults
   1.129 +//!                  The test looks for a specific panic code generated
   1.130 +//!                  when a Parameter Index call is made following a
   1.131 +//!                  prepare on a non-existent table.
   1.132 +//! @SYMREQ           REQ5792
   1.133 +	RUN_PANIC_STEP_RESULT 2 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\Panics.ini Six
   1.134 +END_TESTCASE SYSLIB-SQL-CIT-1805
   1.135 +
   1.136 +RUN_UTILS DeleteFile C:\Panics0.db
   1.137 +