Skip to content

Commit 70c1ddd

Browse files
committed
[NFC] Format test file
1 parent 5aa3cf3 commit 70c1ddd

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

test/testbufferoverrun.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5717,29 +5717,29 @@ class TestBufferOverrun : public TestFixture {
57175717

57185718
void getBufferSizeOfAddressOfVariable() { // #7570
57195719

5720-
check("void f() {\n"
5721-
" int i;\n"
5722-
" memset(&i, 0, 1000);\n"
5723-
"}");
5724-
ASSERT_EQUALS("[test.cpp:3:10]: (error) Buffer is accessed out of bounds: &i [bufferAccessOutOfBounds]\n", errout_str());
5720+
check("void f() {\n"
5721+
" int i;\n"
5722+
" memset(&i, 0, 1000);\n"
5723+
"}");
5724+
ASSERT_EQUALS("[test.cpp:3:10]: (error) Buffer is accessed out of bounds: &i [bufferAccessOutOfBounds]\n", errout_str());
57255725

5726-
check("void f() {\n"
5727-
" int i;\n"
5728-
" memset(&i, 0, sizeof(i));\n"
5729-
"}");
5730-
ASSERT_EQUALS("", errout_str());
5726+
check("void f() {\n"
5727+
" int i;\n"
5728+
" memset(&i, 0, sizeof(i));\n"
5729+
"}");
5730+
ASSERT_EQUALS("", errout_str());
57315731

5732-
check("void foo() {\n"
5733-
" char c[6];\n"
5734-
" strncpy(&c, \"hello!\", 6);\n"
5735-
"}");
5736-
ASSERT_EQUALS("[test.cpp:3:3]: (warning, inconclusive) The buffer '&c' may not be null-terminated after the call to strncpy(). [terminateStrncpy]\n", errout_str());
5732+
check("void foo() {\n"
5733+
" char c[6];\n"
5734+
" strncpy(&c, \"hello!\", 6);\n"
5735+
"}");
5736+
ASSERT_EQUALS("[test.cpp:3:3]: (warning, inconclusive) The buffer '&c' may not be null-terminated after the call to strncpy(). [terminateStrncpy]\n", errout_str());
57375737

5738-
check("void foo() {\n"
5739-
" char c[6];\n"
5740-
" memcpy(&c, \"hello\\n\", 6);\n"
5741-
"}");
5742-
ASSERT_EQUALS("", errout_str());
5738+
check("void foo() {\n"
5739+
" char c[6];\n"
5740+
" memcpy(&c, \"hello\\n\", 6);\n"
5741+
"}");
5742+
ASSERT_EQUALS("", errout_str());
57435743
}
57445744
};
57455745

0 commit comments

Comments
 (0)