Added unit test for #5849
This commit is contained in:
parent
288c94a47f
commit
4c18967329
|
@ -171,6 +171,7 @@ private:
|
||||||
TEST_CASE(array_index_44); // #3979
|
TEST_CASE(array_index_44); // #3979
|
||||||
TEST_CASE(array_index_45); // #4207 - calling function with variable number of parameters (...)
|
TEST_CASE(array_index_45); // #4207 - calling function with variable number of parameters (...)
|
||||||
TEST_CASE(array_index_46); // #4840 - two-statement for loop
|
TEST_CASE(array_index_46); // #4840 - two-statement for loop
|
||||||
|
TEST_CASE(array_index_47); // #5849
|
||||||
TEST_CASE(array_index_multidim);
|
TEST_CASE(array_index_multidim);
|
||||||
TEST_CASE(array_index_switch_in_for);
|
TEST_CASE(array_index_switch_in_for);
|
||||||
TEST_CASE(array_index_for_in_for); // FP: #2634
|
TEST_CASE(array_index_for_in_for); // FP: #2634
|
||||||
|
@ -1598,6 +1599,16 @@ private:
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void array_index_47() {
|
||||||
|
// #5849
|
||||||
|
check("int s[4];\n"
|
||||||
|
"void f() {\n"
|
||||||
|
" for (int i = 2; i < 0; i++)\n"
|
||||||
|
" s[i] = 5; \n"
|
||||||
|
"}");
|
||||||
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
}
|
||||||
|
|
||||||
void array_index_multidim() {
|
void array_index_multidim() {
|
||||||
check("void f()\n"
|
check("void f()\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
|
|
Loading…
Reference in New Issue