Tests: Add test-macro-condition-window.cpp

This commit is contained in:
WarmUpTill
2026-05-18 19:36:00 +02:00
parent 680f72e4f9
commit e8206173ff
4 changed files with 450 additions and 19 deletions

View File

@@ -14,6 +14,7 @@ std::string g_foregroundProcessName;
std::string g_foregroundProcessPath;
QStringList g_processList;
QStringList g_processPathsFromName;
std::vector<WindowInfo> g_windows;
} // namespace
@@ -37,11 +38,16 @@ void SetStubProcessPaths(const QStringList &paths)
g_processPathsFromName = paths;
}
void SetStubWindows(const std::vector<WindowInfo> &windows)
{
g_windows = windows;
}
// --- platform-funcs.hpp stubs ---
std::vector<std::string> GetWindowList()
std::vector<WindowInfo> GetWindows(const WindowQueryOptions &)
{
return {};
return g_windows;
}
std::string GetCurrentWindowTitle()
@@ -49,21 +55,6 @@ std::string GetCurrentWindowTitle()
return {};
}
bool IsFullscreen(const std::string &)
{
return false;
}
bool IsMaximized(const std::string &)
{
return false;
}
std::optional<std::string> GetTextInWindow(const std::string &)
{
return {};
}
int SecondsSinceLastInput()
{
return 0;
@@ -97,5 +88,6 @@ bool IsInFocus(const QString &)
// --- selection-helpers.hpp stubs ---
void PopulateProcessSelection(QComboBox *, bool) {}
void PopulateWindowSelection(QComboBox *, bool) {}
} // namespace advss