Skip to content

Commit 1050ed3

Browse files
authored
Add basic/empty test of C++ threads. NFC. (#13237)
1 parent c168284 commit 1050ed3

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include <thread>
2+
3+
int main() {
4+
std::thread([]{}).join();
5+
return 0;
6+
}

tests/pthread/test_pthread_cxx_threads.out

Whitespace-only changes.

tests/test_core.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8080,6 +8080,13 @@ def test_pthread_c11_threads(self):
80808080
self.set_setting('INITIAL_MEMORY', '64mb')
80818081
self.do_run_in_out_file_test('tests', 'pthread', 'test_pthread_c11_threads.c')
80828082

8083+
@node_pthreads
8084+
def test_pthread_cxx_threads(self):
8085+
self.set_setting('PROXY_TO_PTHREAD')
8086+
self.clear_setting('ALLOW_MEMORY_GROWTH')
8087+
self.set_setting('EXIT_RUNTIME')
8088+
self.do_run_in_out_file_test('tests', 'pthread', 'test_pthread_cxx_threads.cpp')
8089+
80838090
@node_pthreads
80848091
def test_pthread_create_pool(self):
80858092
# with a pool, we can synchronously depend on workers being available

0 commit comments

Comments
 (0)