Skip to content

Commit dd19cf6

Browse files
authored
Fix tests that depend on UTF8ToString(). (#24960)
E.g. `wasmfs` test mode pulls in less JS code, so don't get to implicitly/automatically get in `UTF8ToString()`.
1 parent 820eb94 commit dd19cf6

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed

test/core/test_dyncall_pointers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include <stdio.h>
22
#include <emscripten/em_js.h>
33

4-
EM_JS_DEPS(deps, "$dynCall");
4+
EM_JS_DEPS(deps, "$UTF8ToString,$dynCall");
55

66
EM_JS(void, testDynCall, (void* ptr, const char* str), {
77
let rtn = dynCall("pipp", Number(ptr), [42, 43, Number(str)]);

test/core/test_em_asm.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#include <emscripten.h>
77
#include <stdio.h>
88

9+
EM_JS_DEPS(deps, "$UTF8ToString");
10+
911
int main() {
1012
printf("BEGIN\n");
1113
EM_ASM({ out("no args works"); });

test/core/test_em_asm_2.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#include <emscripten.h>
77
#include <stdio.h>
88

9+
EM_JS_DEPS(deps, "$UTF8ToString");
10+
911
int main() {
1012
printf("EM_ASM: Simple expression without trailing semicolon\n");
1113
EM_ASM(out('1. expression without trailing semicolon'));

test/core/test_em_js.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ EM_JS(int, user_comma, (void), {
6363
return x[y][1];
6464
});
6565

66-
EM_JS_DEPS(deps, "$stringToUTF8,$lengthBytesUTF8");
66+
EM_JS_DEPS(deps, "$UTF8ToString,$stringToUTF8,$lengthBytesUTF8");
6767

6868
EM_JS(char*, return_utf8_str, (void), {
6969
var jsString = 'こんにちは';

test/core/test_utf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <emscripten/emscripten.h>
1212
#include <emscripten/em_js.h>
1313

14-
EM_JS_DEPS(deps, "$stringToUTF8OnStack,$getValue");
14+
EM_JS_DEPS(deps, "$UTF8ToString,$stringToUTF8OnStack,$getValue");
1515

1616
int main() {
1717
char *c = "μ†ℱ ╋ℯ╳╋ 😇";

0 commit comments

Comments
 (0)