1. Adds a `libdevilution_so` target when tests are enabled. 2. Each test file is now a separate binary target linked against `libdevilutionx_so` (can now run tests in parallel). 3. Tests are now defined in a separate `test/CMakeLists.txt` file. 4. Building the tests is now controlled by the standard `BUILD_TESTING` option (defined by CTest). 5. Tests are now built by default. 6. On CI, test errors are now reported. Also: * `.clang-format`: Enable SortIncludes in tests * `path_test.cpp`: Fix -Wsign-compare
22 lines
533 B
C++
22 lines
533 B
C++
#pragma once
|
|
|
|
#include <SDL.h>
|
|
|
|
#include "utils/attributes.h"
|
|
|
|
namespace devilution {
|
|
|
|
extern DVL_API_FOR_TEST Uint16 gnScreenWidth;
|
|
extern DVL_API_FOR_TEST Uint16 gnScreenHeight;
|
|
extern DVL_API_FOR_TEST Uint16 gnViewportHeight;
|
|
|
|
Uint16 GetScreenWidth();
|
|
Uint16 GetScreenHeight();
|
|
Uint16 GetViewportHeight();
|
|
|
|
bool SpawnWindow(const char *lpWindowName);
|
|
void ReinitializeRenderer();
|
|
void ResizeWindow();
|
|
void UiErrorOkDialog(const char *caption, const char *text, bool error = true);
|
|
|
|
} // namespace devilution
|