From e962877f593141a16e4bae57e985e9023bd901a6 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 8 Apr 2024 23:09:43 +0800 Subject: format test code --- tests/projects/other/parallel_build/1.cpp | 5 +++-- tests/projects/other/parallel_build/2.cpp | 30 +++++++++++++++--------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/tests/projects/other/parallel_build/1.cpp b/tests/projects/other/parallel_build/1.cpp index c6dee1602..9cd1218ae 100644 --- a/tests/projects/other/parallel_build/1.cpp +++ b/tests/projects/other/parallel_build/1.cpp @@ -1,2 +1,3 @@ -int main(){ -} \ No newline at end of file +int main(int argv, char** argv) { + return 0; +} diff --git a/tests/projects/other/parallel_build/2.cpp b/tests/projects/other/parallel_build/2.cpp index 3bedf31ca..dd82f0605 100644 --- a/tests/projects/other/parallel_build/2.cpp +++ b/tests/projects/other/parallel_build/2.cpp @@ -14,18 +14,18 @@ #include #include -int main() { - - using Type = std::variant; - Type a, b, c; - a = 5; - b = 3.0; - c = 4.0f; - double r; - std::visit([&](auto a, auto b, auto c) { r = a + b + c; }, a, b, c); - std::visit([&](auto a, auto b, auto c) { r = a + b - c; }, a, b, c); - std::visit([&](auto a, auto b, auto c) { r = a - b - c; }, a, b, c); - std::visit([&](auto a, auto b, auto c) { r = (a + b + c) * 2; }, a, b, c); - std::visit([&](auto a, auto b, auto c) { r = (a + b - c) * 3; }, a, b, c); -} \ No newline at end of file +int main(int argc, char** argv) { + using Type = std::variant; + Type a, b, c; + a = 5; + b = 3.0; + c = 4.0f; + double r; + std::visit([&](auto a, auto b, auto c) { r = a + b + c; }, a, b, c); + std::visit([&](auto a, auto b, auto c) { r = a + b - c; }, a, b, c); + std::visit([&](auto a, auto b, auto c) { r = a - b - c; }, a, b, c); + std::visit([&](auto a, auto b, auto c) { r = (a + b + c) * 2; }, a, b, c); + std::visit([&](auto a, auto b, auto c) { r = (a + b - c) * 3; }, a, b, c); + return 0; +} -- cgit v1.3.1