Skip to content

Commit ebef16b

Browse files
committed
Travis: Try to remove temporary fix
1 parent 34a8b2b commit ebef16b

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎test/testbufferoverrun.cpp‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -928,16 +928,14 @@ class TestBufferOverrun : public TestFixture {
928928

929929
void array_index_24() {
930930
// ticket #1492 and #1539
931-
std::ostringstream charMaxPlusOne;
932-
charMaxPlusOne << (settings0.defaultSign == 'u' ? 256 : 128);
931+
const std::string charMaxPlusOne(settings0.defaultSign == 'u' ? "256" : "128");
933932
check(("void f(char n) {\n"
934933
" int a[n];\n" // n <= CHAR_MAX
935934
" a[-1] = 0;\n" // negative index
936-
" a[" + charMaxPlusOne.str() + "] = 0;\n" // 128/256 > CHAR_MAX
935+
" a[" + charMaxPlusOne + "] = 0;\n" // 128/256 > CHAR_MAX
937936
"}\n").c_str());
938-
// FIXME
939-
//ASSERT_EQUALS("[test.cpp:3]: (error) Array 'a["+charMaxPlusOne.str()+"]' accessed at index -1, which is out of bounds.\n"
940-
// "[test.cpp:4]: (error) Array 'a["+charMaxPlusOne.str()+"]' accessed at index "+charMaxPlusOne.str()+", which is out of bounds.\n", errout.str());
937+
ASSERT_EQUALS("[test.cpp:3]: (error) Array 'a[" + charMaxPlusOne + "]' accessed at index -1, which is out of bounds.\n"
938+
"[test.cpp:4]: (error) Array 'a[" + charMaxPlusOne + "]' accessed at index " + charMaxPlusOne + ", which is out of bounds.\n", errout.str());
941939

942940
check("void f(signed char n) {\n"
943941
" int a[n];\n" // n <= SCHAR_MAX

0 commit comments

Comments
 (0)