pcbjam/tests/wasm-app/minimal_test.cpp
Viktor Vaczi 3f67fed173 Add Playwright test infrastructure for wxWidgets WASM port
- Add tests/ directory with Playwright e2e tests
- Add minimal wxWidgets WASM test application
- Add build script for test app (scripts/build-wasm-test.sh)
- Update wxWidgets submodule with WASM build fixes
- Update .gitignore for test artifacts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 13:10:05 +01:00

42 lines
771 B
C++

// Minimal wxWidgets WASM Test Application
// Purpose: Verify wxWidgets WASM port is working correctly
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
class TestApp : public wxApp
{
public:
virtual bool OnInit() wxOVERRIDE;
};
class TestFrame : public wxFrame
{
public:
TestFrame(const wxString& title);
};
wxIMPLEMENT_APP(TestApp);
bool TestApp::OnInit()
{
if (!wxApp::OnInit())
return false;
TestFrame *frame = new TestFrame("wxWidgets WASM Test");
frame->Show(true);
return true;
}
TestFrame::TestFrame(const wxString& title)
: wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(640, 480))
{
#if wxUSE_STATUSBAR
CreateStatusBar();
SetStatusText("wxWidgets WASM is working!");
#endif
}