This commit is contained in:
Бранимир Караџић
2024-10-27 23:28:39 -07:00
parent 60f2d883a3
commit 2cebc558eb
3 changed files with 18 additions and 5 deletions

View File

@@ -87,6 +87,15 @@ project "bx.test"
"Cocoa.framework",
}
configuration { "wasm" }
buildoptions {
"-fwasm-exceptions",
}
linkoptions {
"-fwasm-exceptions",
"-s STACK_SIZE=262144",
}
configuration {}
strip()

View File

@@ -50,8 +50,6 @@
# include <sys/syscall.h>
# elif BX_PLATFORM_OSX
# include <mach/mach.h> // mach_task_basic_info
# elif BX_PLATFORM_ANDROID
# include "debug.h" // getTid is not implemented...
# endif // BX_PLATFORM_ANDROID
#endif // BX_PLATFORM_
@@ -65,7 +63,7 @@ namespace bx
|| BX_PLATFORM_WINRT \
|| BX_CRT_NONE
BX_UNUSED(_ms);
debugOutput("sleep is not implemented"); debugBreak();
BX_ASSERT(false, "Function '%s' is not implemented!", BX_FUNCTION);
#else
timespec req = { (time_t)_ms/1000, (long)( (_ms%1000)*1000000) };
timespec rem = { 0, 0 };
@@ -80,7 +78,7 @@ namespace bx
#elif BX_PLATFORM_XBOXONE \
|| BX_PLATFORM_WINRT \
|| BX_CRT_NONE
debugOutput("yield is not implemented"); debugBreak();
BX_ASSERT(false, "Function '%s' is not implemented!", BX_FUNCTION);
#else
::sched_yield();
#endif // BX_PLATFORM_
@@ -97,7 +95,7 @@ namespace bx
|| BX_PLATFORM_OSX
return (mach_port_t)::pthread_mach_thread_np(pthread_self() );
#else
debugOutput("getTid is not implemented"); debugBreak();
BX_ASSERT(false, "Function '%s' is not implemented!", BX_FUNCTION);
return 0;
#endif // BX_PLATFORM_
}
@@ -155,6 +153,7 @@ namespace bx
);
return pmc.WorkingSetSize;
#else
BX_ASSERT(false, "Function '%s' is not implemented!", BX_FUNCTION);
return 0;
#endif // BX_PLATFORM_*
}

View File

@@ -130,6 +130,11 @@ TEST_CASE("FilePath temp", "[filepath]")
tmp.join("bx.test/abvgd/555333/test");
REQUIRE(bx::makeAll(tmp, bx::ErrorAssert{}) );
if (BX_ENABLED(BX_PLATFORM_EMSCRIPTEN) )
{
SKIP("Not supported by wasm.");
}
tmp.set(bx::Dir::Temp);
tmp.join("bx.test");
REQUIRE(bx::removeAll(tmp, bx::ErrorAssert{}) );