aboutsummaryrefslogtreecommitdiff
path: root/src/zencore-test
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-05-02 10:01:47 +0200
committerGitHub <[email protected]>2023-05-02 10:01:47 +0200
commit075d17f8ada47e990fe94606c3d21df409223465 (patch)
treee50549b766a2f3c354798a54ff73404217b4c9af /src/zencore-test
parentfix: bundle shouldn't append content zip to zen (diff)
downloadzen-075d17f8ada47e990fe94606c3d21df409223465.tar.xz
zen-075d17f8ada47e990fe94606c3d21df409223465.zip
moved source directories into `/src` (#264)
* moved source directories into `/src` * updated bundle.lua for new `src` path * moved some docs, icon * removed old test trees
Diffstat (limited to 'src/zencore-test')
-rw-r--r--src/zencore-test/targetver.h10
-rw-r--r--src/zencore-test/xmake.lua8
-rw-r--r--src/zencore-test/zencore-test.cpp26
3 files changed, 44 insertions, 0 deletions
diff --git a/src/zencore-test/targetver.h b/src/zencore-test/targetver.h
new file mode 100644
index 000000000..d432d6993
--- /dev/null
+++ b/src/zencore-test/targetver.h
@@ -0,0 +1,10 @@
+// Copyright Epic Games, Inc. All Rights Reserved.
+
+#pragma once
+
+// Including SDKDDKVer.h defines the highest available Windows platform.
+
+// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
+// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
+
+#include <SDKDDKVer.h>
diff --git a/src/zencore-test/xmake.lua b/src/zencore-test/xmake.lua
new file mode 100644
index 000000000..74c7e74a7
--- /dev/null
+++ b/src/zencore-test/xmake.lua
@@ -0,0 +1,8 @@
+-- Copyright Epic Games, Inc. All Rights Reserved.
+
+target("zencore-test")
+ set_kind("binary")
+ add_headerfiles("**.h")
+ add_files("*.cpp")
+ add_deps("zencore")
+ add_packages("vcpkg::doctest")
diff --git a/src/zencore-test/zencore-test.cpp b/src/zencore-test/zencore-test.cpp
new file mode 100644
index 000000000..53413fb25
--- /dev/null
+++ b/src/zencore-test/zencore-test.cpp
@@ -0,0 +1,26 @@
+// Copyright Epic Games, Inc. All Rights Reserved.
+
+// zencore-test.cpp : Defines the entry point for the console application.
+//
+
+#include <zencore/logging.h>
+#include <zencore/zencore.h>
+
+#if ZEN_WITH_TESTS
+# define ZEN_TEST_WITH_RUNNER 1
+# include <zencore/testing.h>
+#endif
+
+int
+main([[maybe_unused]] int argc, [[maybe_unused]] char* argv[])
+{
+#if ZEN_WITH_TESTS
+ zen::zencore_forcelinktests();
+
+ zen::logging::InitializeLogging();
+
+ return ZEN_RUN_TESTS(argc, argv);
+#else
+ return 0;
+#endif
+}