diff --git a/tests/dim/common-shared-1.bas b/tests/dim/common-shared-1.bas index 5e049602de..45f3cc93ea 100644 --- a/tests/dim/common-shared-1.bas +++ b/tests/dim/common-shared-1.bas @@ -1,5 +1,8 @@ #include "fbcunit.bi" +'' Emscripten (and wasm) doesn't support common symbols +#ifndef __FB_JS__ + #include "common-shared.bi" '' COMMON SHARED in the global namespace test @@ -73,3 +76,5 @@ SUITE( fbc_tests.dim_.common_shared_1 ) shadowingACommon.test_proc END_TEST END_SUITE + +#endif diff --git a/tests/dim/common-shared-2.bas b/tests/dim/common-shared-2.bas index d0278b5f6e..a2d4b4baa2 100644 --- a/tests/dim/common-shared-2.bas +++ b/tests/dim/common-shared-2.bas @@ -1,5 +1,8 @@ #include "fbcunit.bi" +'' Emscripten (and wasm) doesn't support common symbols +#ifndef __FB_JS__ + #include "common-shared.bi" '' COMMON SHARED in the global namespace test @@ -16,3 +19,5 @@ sub commonShared2Checks( ) CU_ASSERT( lbound( arrayi5 ) = 5 ) : CU_ASSERT( ubound( arrayi5 ) = 5 ) CU_ASSERT( lbound( arrayi6 ) = 6 ) : CU_ASSERT( ubound( arrayi6 ) = 6 ) end sub + +#endif diff --git a/tests/dim/redim.bas b/tests/dim/redim.bas index af74a794cc..7969a66591 100644 --- a/tests/dim/redim.bas +++ b/tests/dim/redim.bas @@ -78,6 +78,9 @@ SUITE( fbc_tests.dim_.redim_ ) END_TEST END_TEST_GROUP + '' Emscripten (and wasm) doesn't support common symbols + #ifndef __FB_JS__ + '' Regression test for #3474348 TEST_GROUP( commonRedimRedim ) common array() as integer @@ -115,6 +118,8 @@ SUITE( fbc_tests.dim_.redim_ ) END_TEST END_TEST_GROUP + #endif + '' Regression test for #3510684: An array using a different mangling, which '' affects the array descriptor too -- should still work just the same. extern "C" diff --git a/tests/namespace/redim-3.bas b/tests/namespace/redim-3.bas index b5a81518f3..a4adfe95cf 100644 --- a/tests/namespace/redim-3.bas +++ b/tests/namespace/redim-3.bas @@ -1,5 +1,11 @@ #include "fbcunit.bi" +'' Emscripten (and wasm) doesn't support common symbols +#ifdef __FB_JS__ + #undef common + #define common dim '' Fixes the compile but fails tests +#endif + common shared array1() as integer common shared array2() as integer dim shared array3() as integer