Skip to content

Commit c449709

Browse files
committed
chore: test more clang versiion
1 parent 87273ac commit c449709

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

testing/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ failed_cases=`grep -c "Failed" result.txt`
1111

1212
echo $failed_cases " cases failed."
1313

14-
if [ $failed_cases -eq 12 ]; then
14+
if [ $failed_cases -eq 9 ]; then
1515
echo "=============================="
1616
echo "Test cpp-linter-hooks success."
1717
echo "=============================="

tests/test_clang_format.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
('args', 'expected_retval'), (
99
(['--style=Google'], (0, "")),
1010
(['--style=Google', '--version=16'], (0, "")),
11+
(['--style=Google', '--version=17'], (0, "")),
12+
(['--style=Google', '--version=18'], (0, "")),
13+
(['--style=Google', '--version=19'], (0, "")),
14+
(['--style=Google', '--version=20'], (0, "")),
1115
),
1216
)
1317
def test_run_clang_format_valid(args, expected_retval, tmp_path):
@@ -23,6 +27,10 @@ def test_run_clang_format_valid(args, expected_retval, tmp_path):
2327
('args', 'expected_retval'), (
2428
(['--style=Google',], 1),
2529
(['--style=Google', '--version=16'], 1),
30+
(['--style=Google', '--version=17'], 1),
31+
(['--style=Google', '--version=18'], 1),
32+
(['--style=Google', '--version=19'], 1),
33+
(['--style=Google', '--version=20'], 1),
2634
),
2735
)
2836
def test_run_clang_format_invalid(args, expected_retval, tmp_path):

tests/test_clang_tidy.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ def generate_compilation_database():
1616
('args', 'expected_retval'), (
1717
(['--checks="boost-*"'], 1),
1818
(['--checks="boost-*"', '--version=16'], 1),
19+
(['--checks="boost-*"', '--version=17'], 1),
20+
(['--checks="boost-*"', '--version=18'], 1),
21+
(['--checks="boost-*"', '--version=19'], 1),
22+
(['--checks="boost-*"', '--version=20'], 1),
1923
),
2024
)
2125
def test_run_clang_tidy_valid(args, expected_retval):
@@ -31,6 +35,10 @@ def test_run_clang_tidy_valid(args, expected_retval):
3135
('args', 'expected_retval'), (
3236
(['--checks="boost-*"'], 1),
3337
(['--checks="boost-*"', '--version=16'], 1),
38+
(['--checks="boost-*"', '--version=17'], 1),
39+
(['--checks="boost-*"', '--version=18'], 1),
40+
(['--checks="boost-*"', '--version=19'], 1),
41+
(['--checks="boost-*"', '--version=20'], 1),
3442
),
3543
)
3644
def test_run_clang_tidy_invalid(args, expected_retval, tmp_path):

tests/test_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from cpp_linter_hooks.util import ensure_installed, DEFAULT_CLANG_VERSION
77

88

9-
VERSIONS = [None, "16"]
9+
VERSIONS = [None, "18"]
1010
TOOLS = ["clang-format", "clang-tidy"]
1111

1212

0 commit comments

Comments
 (0)