summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-04-08 23:09:43 +0800
committerruki <[email protected]>2024-04-08 23:09:43 +0800
commite962877f593141a16e4bae57e985e9023bd901a6 (patch)
tree27d64ce1525120bc99d0e3d08a55f2ad59114267
parentf64943bd2dacfb0790472fcbd6eb9731c5e4adc0 (diff)
format test code
-rw-r--r--tests/projects/other/parallel_build/1.cpp5
-rw-r--r--tests/projects/other/parallel_build/2.cpp30
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 <variant>
#include <vector>
-int main() {
-
- using Type = std::variant<int8_t, uint8_t, int16_t, uint16_t, int32_t,
- uint32_t, int64_t, uint64_t, double, float>;
- 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<int8_t, uint8_t, int16_t, uint16_t, int32_t,
+ uint32_t, int64_t, uint64_t, double, float>;
+ 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;
+}