added testcase for ticket #3273

This commit is contained in:
Ettl Martin 2011-11-01 11:52:39 +01:00
parent 4d888d8a34
commit 603a37b08a
1 changed files with 22 additions and 0 deletions

View File

@ -112,6 +112,7 @@ private:
TEST_CASE(array_index_35); // ticket #2889
TEST_CASE(array_index_36); // ticket #2960
TEST_CASE(array_index_37);
TEST_CASE(array_index_38); // ticket #3273
TEST_CASE(array_index_multidim);
TEST_CASE(array_index_switch_in_for);
TEST_CASE(array_index_for_in_for); // FP: #2634
@ -1267,6 +1268,27 @@ private:
ASSERT_EQUALS("", errout.str());
}
void array_index_38() { //ticket #3273
check("void aFunction()\n"
"{\n"
" const unsigned int arraySize = 10;\n"
" double aDoubleArray[ arraySize ];\n"
" unsigned int i = 0;\n"
" for( i = 0; i < 6; i++ )\n"
" {\n"
" unsigned int j = 0;\n"
" for( j = 0; j < 5; j++ )\n"
" {\n"
" unsigned int x = 0;\n"
" for( x = 0; x < 4; x++ )\n"
" {\n"
" }\n"
" }\n"
" }\n"
"}\n");
ASSERT_EQUALS("", errout.str());
}
void array_index_multidim() {
check("void f()\n"
"{\n"