Skip to content

Commit

Permalink
Update teststl.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed May 16, 2024
1 parent 9796482 commit c7bf02b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/teststl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,12 @@ class TestStl : public TestFixture {
" return s[2];\n"
"}\n");
ASSERT_EQUALS("test.cpp:4:error:Out of bounds access in expression 's[2]' because 's' is empty.\n", errout_str());

checkNormal("void f() {\n" // #12738
" std::vector<double> v{ 0, 0.1 };\n"
" (void)v[0];\n"
"}\n");
ASSERT_EQUALS("", errout_str());
}

void outOfBoundsSymbolic()
Expand Down

0 comments on commit c7bf02b

Please sign in to comment.