Porting to WASM
This commit is contained in:
@@ -14,7 +14,7 @@ void AddText(String string) {
|
||||
event.kind = EVENT_TEXT_INPUT;
|
||||
event.xwindow = 1280;
|
||||
event.ywindow = 720;
|
||||
event.text = Copy(Perm, string).data;
|
||||
event.text = Copy(SysAllocator, string).data;
|
||||
Add(&EventPlayback, event);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ void Wait(mco_coro *co) {
|
||||
|
||||
void PlayTestOpen(mco_coro *co) {
|
||||
// Open file, move a little, then open again and verify the caret didn't move
|
||||
String basic_env_cpp = Format(Perm, "%.*s/basic_env/basic_env.cpp", FmtString(TestDir));
|
||||
String basic_env_cpp = Format(SysAllocator, "%.*s/basic_env/basic_env.cpp", FmtString(TestDir));
|
||||
|
||||
AddCtrlPress(SDLK_P);
|
||||
Add(&EventPlayback, {EVENT_KEY_PRESS, SDLK_UP, 1280, 720});
|
||||
@@ -69,7 +69,7 @@ void PlayTestOpen(mco_coro *co) {
|
||||
buffer_len = main.buffer->len;
|
||||
}
|
||||
|
||||
AddText(Format(Perm, "%.*s:20", FmtString(basic_env_cpp)));
|
||||
AddText(Format(SysAllocator, "%.*s:20", FmtString(basic_env_cpp)));
|
||||
AddCtrlPress(SDLK_Q);
|
||||
Wait(co);
|
||||
|
||||
@@ -98,7 +98,7 @@ void PlayTestOpen(mco_coro *co) {
|
||||
}
|
||||
|
||||
void Test(mco_coro *co) {
|
||||
WorkDir = Format(Perm, "%.*s/basic_env", FmtString(TestDir));
|
||||
WorkDir = Format(SysAllocator, "%.*s/basic_env", FmtString(TestDir));
|
||||
PlayTestOpen(co);
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ void InitTests() {
|
||||
StyleWaitForEvents = false;
|
||||
{
|
||||
String file = __FILE__;
|
||||
file = NormalizePath(Perm, file);
|
||||
file = NormalizePath(SysAllocator, file);
|
||||
file = ChopLastSlash(file);
|
||||
TestDir = file;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user