Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

test: match standalone WASM harness memory growth to the runtime

yhhf30e609f2576
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 8e3f80951..f2889b766 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -3,6 +3,12 @@
# doctest header-only framework
include_directories(${CMAKE_SOURCE_DIR}/third_party/doctest)
+# Match the shipped WASM heap policy for every standalone harness. Deep
+# hierarchy stress needs more than Emscripten's fixed default heap.
+if(EMSCRIPTEN)
+ add_link_options(-sALLOW_MEMORY_GROWTH=1)
+endif()
+
# ECS tests
add_executable(test_skeletal_batch_color renderer/test_skeletal_batch_color.cpp)
target_include_directories(test_skeletal_batch_color PRIVATE ${CMAKE_SOURCE_DIR}/src)