Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions tests/other/test_pthread_icu.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#include <thread>
#include <iostream>
#include <thread>
#include <unicode/unistr.h>

// Test that code using both pthread and icu compiles.
int main () {
std::thread([] {
std::string str;
icu::UnicodeString ustr("Hello world!");
ustr.toUTF8String(str);
std::cout << str << std::endl;
}).detach();
}
int main() {
std::thread([] {
std::string str;
icu::UnicodeString ustr("Hello world!");
ustr.toUTF8String(str);
std::cout << str << std::endl;
}).join();
}
1 change: 1 addition & 0 deletions tests/other/test_pthread_icu.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hello world!
8 changes: 6 additions & 2 deletions tests/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -11126,8 +11126,12 @@ def test_pthread_out_err(self):
self.do_other_test('test_pthread_out_err.c')

@node_pthreads
def test_icu_mt(self):
self.do_smart_test(test_file('other/test_pthread_icu.cpp'), emcc_args=['-pthread', '-sUSE_ICU', '-sPTHREAD_POOL_SIZE_STRICT=4', '-sEXIT_RUNTIME'])
def test_pthread_icu(self):
self.set_setting('USE_PTHREADS')
self.set_setting('USE_ICU')
self.set_setting('PROXY_TO_PTHREAD')
self.set_setting('EXIT_RUNTIME')
self.do_other_test('test_pthread_icu.cpp')

# unistd tests

Expand Down