@@ -335,7 +335,7 @@ def decorated(self, *args, **kwargs):
335
335
return outer_decorator
336
336
337
337
338
- def maybe_with_textdecoder (f ):
338
+ def with_both_text_decoder (f ):
339
339
assert callable (f )
340
340
341
341
@wraps (f )
@@ -5662,39 +5662,39 @@ def test_utime(self):
5662
5662
def test_futimens (self ):
5663
5663
self .do_runf ('utime/test_futimens.c' , 'success' )
5664
5664
5665
- @maybe_with_textdecoder
5665
+ @with_both_text_decoder
5666
5666
def test_utf (self ):
5667
5667
self .set_setting ('EXPORTED_RUNTIME_METHODS' , ['getValue' , 'setValue' , 'UTF8ToString' , 'stringToUTF8OnStack' ])
5668
5668
self .do_core_test ('test_utf.c' )
5669
5669
5670
- @maybe_with_textdecoder
5670
+ @with_both_text_decoder
5671
5671
def test_utf32 (self ):
5672
5672
self .do_runf ('utf32.cpp' , 'OK (long).\n ' )
5673
5673
5674
- @maybe_with_textdecoder
5674
+ @with_both_text_decoder
5675
5675
@no_sanitize ('requires libc to be built with -fshort-char' )
5676
5676
def test_utf32_short_wchar (self ):
5677
5677
if '-flto' in self .emcc_args or '-flto=thin' in self .emcc_args :
5678
5678
self .skipTest ('-fshort-wchar is not compatible with LTO (libraries would need rebuilting)' )
5679
5679
self .do_runf ('utf32.cpp' , 'OK (short).\n ' , emcc_args = ['-fshort-wchar' ])
5680
5680
5681
- @maybe_with_textdecoder
5681
+ @with_both_text_decoder
5682
5682
@crossplatform
5683
5683
def test_utf16 (self ):
5684
5684
self .do_runf ('core/test_utf16.cpp' , 'OK.' )
5685
5685
5686
- @maybe_with_textdecoder
5686
+ @with_both_text_decoder
5687
5687
def test_utf8 (self ):
5688
5688
self .do_runf ('core/test_utf8.c' , 'OK.' )
5689
5689
5690
- @maybe_with_textdecoder
5690
+ @with_both_text_decoder
5691
5691
@also_with_wasm_bigint
5692
5692
def test_utf8_bench (self ):
5693
5693
self .emcc_args += ['--embed-file' , test_file ('utf8_corpus.txt' ) + '@/utf8_corpus.txt' ]
5694
5694
self .do_runf ('benchmark/benchmark_utf8.c' , 'OK.' )
5695
5695
5696
5696
# Test that invalid character in UTF8 does not cause decoding to crash.
5697
- @maybe_with_textdecoder
5697
+ @with_both_text_decoder
5698
5698
@also_with_minimal_runtime
5699
5699
def test_utf8_invalid (self ):
5700
5700
self .do_runf ('test_utf8_invalid.c' , 'OK.' )
0 commit comments