summaryrefslogtreecommitdiff
path: root/test cases/unit
diff options
context:
space:
mode:
authorLei YU <yulei.sh@bytedance.com>2023-09-28 07:26:12 +0000
committerEli Schwartz <eschwartz93@gmail.com>2023-09-28 10:54:39 -0400
commitdac25ba9a8dc3833edbc0d0fd133bc61c706f84a (patch)
tree7d382ffd3bd73427f5cce0d03e7ac7c720a43257 /test cases/unit
parent5ff59f2fb515f47ed61598fed7749982fb20e49f (diff)
downloadmeson-dac25ba9a8dc3833edbc0d0fd133bc61c706f84a.tar.gz
unittest: Fix clang-tidy-fix
The unittest case for `clang-tidy-fix` checks if the whole project is in git or not, and skips if not. Fix this by creating a temporary git repo, copy the test files and run the tests, following how `clang-format` does. It also reverts some help code introduced in the previous test. Tested: Verify the test case passes. Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Diffstat (limited to 'test cases/unit')
-rw-r--r--test cases/unit/68 clang-tidy/cttest_fixed.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test cases/unit/68 clang-tidy/cttest_fixed.cpp b/test cases/unit/68 clang-tidy/cttest_fixed.cpp
new file mode 100644
index 000000000..5b422f6e9
--- /dev/null
+++ b/test cases/unit/68 clang-tidy/cttest_fixed.cpp
@@ -0,0 +1,7 @@
+#include<cstdio>
+
+int main(int, char**) {
+ bool intbool = true;
+ printf("Intbool is %d\n", (int)intbool);
+ return 0;
+}