Skip to content

Commit 3350ec9

Browse files
committed
[libc++] Add missing 'return 0' from main functions in tests
1 parent 1390675 commit 3350ec9

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

libcxx/test/libcxx/algorithms/alg.sorting/pstl.is_partitioned.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,6 @@ int main(int, char**) {
2626
return i < 5;
2727
}));
2828
assert(call_count == std::size(a));
29+
30+
return 0;
2931
}

libcxx/test/libcxx/algorithms/robust_against_using_non_transparent_comparators.pass.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ struct Iterator {
5858
T* ptr_;
5959
};
6060

61-
int main() {
61+
int main(int, char**) {
6262
int array[5] = {1, 2, 3, 4, 5};
6363
Iterator<int> first(array);
6464
Iterator<int> middle(array + 3);
@@ -74,4 +74,6 @@ int main() {
7474
(void)std::min_element(first, last);
7575
(void)std::minmax_element(first, last);
7676
(void)std::upper_bound(first, last, 3);
77+
78+
return 0;
7779
}

libcxx/test/std/thread/thread.stoptoken/stopcallback/dtor.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,4 +163,6 @@ int main(int, char**) {
163163
ss.request_stop(); // the callbacks deletes itself. if the destructor blocks, it would be deadlock
164164
assert(holder.callback_ == nullptr);
165165
}
166+
167+
return 0;
166168
}

libcxx/test/std/utilities/expol/policies.compile.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,6 @@ int main(int, char**) {
4747
#if TEST_STD_VER >= 20
4848
use(std::execution::unseq);
4949
#endif
50+
51+
return 0;
5052
}

0 commit comments

Comments
 (0)