Skip to content

Commit 30ea7f1

Browse files
committed
[include-cleaner] testing display warnings of deprecated commands
1 parent dd552fc commit 30ea7f1

File tree

1 file changed

+17
-0
lines changed
  • clang-tools-extra/include-cleaner/test

1 file changed

+17
-0
lines changed

clang-tools-extra/include-cleaner/test/tool.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,20 @@ int x = foo();
5858
// RUN: FileCheck --match-full-lines --check-prefix=EDIT3 %s < %t.cpp
5959
// EDIT3: #include "foo.h"
6060
// EDIT3-NOT: {{^}}#include "foobar.h"{{$}}
61+
62+
// RUN: clang-include-cleaner -insert=false -print=changes %s -- -I%S/Inputs/ 2>&1 | \
63+
// RUN: FileCheck --check-prefix=DEPRECATED-INSERT %s
64+
// DEPRECATED-INSERT: [WARNING] -insert is deprecated in favor of `-disable-insert`
65+
// DEPRECATED-INSERT: The old flag was confusing since it suggested that inserts
66+
// DEPRECATED-INSERT: were disabled by default, when they were actually enabled
67+
68+
// RUN: clang-include-cleaner -remove=false -print=changes %s -- -I%S/Inputs/ 2>&1 | \
69+
// RUN: FileCheck --check-prefix=DEPRECATED-REMOVE %s
70+
// DEPRECATED-REMOVE: [WARNING] -remove is deprecated in favor of `-disable-remove`
71+
// DEPRECATED-REMOVE: The old flag was confusing since it suggested that removes
72+
// DEPRECATED-REMOVE: were disabled by default, when they were actually enabled
73+
74+
// RUN: clang-include-cleaner -insert=false -remove=false -print=changes %s -- -I%S/Inputs/ 2>&1 | \
75+
// RUN: FileCheck --check-prefix=DEPRECATED-BOTH %s
76+
// DEPRECATED-BOTH: [WARNING] -insert is deprecated in favor of `-disable-insert`
77+
// DEPRECATED-BOTH: [WARNING] -remove is deprecated in favor of `-disable-remove`

0 commit comments

Comments
 (0)