diff options
Diffstat (limited to 'tests/testsrc')
-rw-r--r-- | tests/testsrc/bad/brackets.cpp | 2 | ||||
-rw-r--r-- | tests/testsrc/bad/brackets.h | 7 | ||||
-rw-r--r-- | tests/testsrc/good/brackets2.cpp | 2 | ||||
-rw-r--r-- | tests/testsrc/good/constructor1.cpp | 2 |
4 files changed, 13 insertions, 0 deletions
diff --git a/tests/testsrc/bad/brackets.cpp b/tests/testsrc/bad/brackets.cpp index 898a258..7fc6552 100644 --- a/tests/testsrc/bad/brackets.cpp +++ b/tests/testsrc/bad/brackets.cpp @@ -69,6 +69,8 @@ void func5() else { } } + type *var = new type(); + type2 *var2 = new type2(123); } void func6() diff --git a/tests/testsrc/bad/brackets.h b/tests/testsrc/bad/brackets.h index bb1ba39..d56d23f 100644 --- a/tests/testsrc/bad/brackets.h +++ b/tests/testsrc/bad/brackets.h @@ -77,3 +77,10 @@ void func6() } } } + +void func7() +{ + type *var = new type(); + type *var2; + type2 *var3 = new type2(123); +} diff --git a/tests/testsrc/good/brackets2.cpp b/tests/testsrc/good/brackets2.cpp index 2199d6f..fe9ed3c 100644 --- a/tests/testsrc/good/brackets2.cpp +++ b/tests/testsrc/good/brackets2.cpp @@ -78,4 +78,6 @@ void func6() // } else { // } // } + type *var = mnew type(); + type2 *var = new type2(123); } diff --git a/tests/testsrc/good/constructor1.cpp b/tests/testsrc/good/constructor1.cpp index d300f06..99f12f7 100644 --- a/tests/testsrc/good/constructor1.cpp +++ b/tests/testsrc/good/constructor1.cpp @@ -38,5 +38,7 @@ struct Test2 final data1(), data2() { + type *var = mnew type(); + type2 *var = new type2(123); } } |