summaryrefslogtreecommitdiffstatshomepage
path: root/scripts
diff options
context:
space:
mode:
author Miodrag Milanović <mmicko@gmail.com>2016-11-14 15:30:11 +0100
committer GitHub <noreply@github.com>2016-11-14 15:30:11 +0100
commit3d09d05647ee410fe1e160be3933999fb69fc864 (patch)
tree168e8c7bd56241ad71fc3f859d212d28d7133a07 /scripts
parent546b07e4000599671dbaaf64740f503dc414f00b (diff)
parent75c6c0f059c955f0fa8b5f99e30dc650f0503147 (diff)
Merge pull request #1676 from mmicko/testing
Add more applicable Catch testing framework. Converted all tests to be done properly by guideline. (nw)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/src/tests.lua83
1 files changed, 45 insertions, 38 deletions
diff --git a/scripts/src/tests.lua b/scripts/src/tests.lua
index e0a8da88d75..7b4185f5005 100644
--- a/scripts/src/tests.lua
+++ b/scripts/src/tests.lua
@@ -8,37 +8,6 @@
-- Rules for building tests
--
---------------------------------------------------------------------------
---------------------------------------------------
--- GoogleTest library objects
---------------------------------------------------
-
-project "gtest"
- uuid "fa306a8d-fb10-4d4a-9d2e-fdb9076407b4"
- kind "StaticLib"
-
- configuration { "gmake or ninja" }
- buildoptions {
- "-Wno-undef",
- "-Wno-unused-variable",
- }
-
- configuration { "vs*" }
-if _OPTIONS["vs"]=="intel-15" then
- buildoptions {
- "/Qwd1195", -- error #1195: conversion from integer to smaller pointer
- }
-end
-
- configuration { }
-
- includedirs {
- MAME_DIR .. "3rdparty/googletest/googletest/include",
- MAME_DIR .. "3rdparty/googletest/googletest",
- }
- files {
- MAME_DIR .. "3rdparty/googletest/googletest/src/gtest-all.cc",
- }
-
project("mametests")
uuid ("66d4c639-196b-4065-a411-7ee9266564f5")
@@ -52,15 +21,52 @@ project("mametests")
targetdir(MAME_DIR)
end
- configuration { "gmake or ninja" }
- buildoptions {
- "-Wno-undef",
- }
-
+ configuration { "x64", "Release" }
+ targetsuffix "64"
+ if _OPTIONS["PROFILE"] then
+ targetsuffix "64p"
+ end
+
+ configuration { "x64", "Debug" }
+ targetsuffix "64d"
+ if _OPTIONS["PROFILE"] then
+ targetsuffix "64dp"
+ end
+
+ configuration { "x32", "Release" }
+ targetsuffix ""
+ if _OPTIONS["PROFILE"] then
+ targetsuffix "p"
+ end
+
+ configuration { "x32", "Debug" }
+ targetsuffix "d"
+ if _OPTIONS["PROFILE"] then
+ targetsuffix "dp"
+ end
+
+ configuration { "Native", "Release" }
+ targetsuffix ""
+ if _OPTIONS["PROFILE"] then
+ targetsuffix "p"
+ end
+
+ configuration { "Native", "Debug" }
+ targetsuffix "d"
+ if _OPTIONS["PROFILE"] then
+ targetsuffix "dp"
+ end
+
+ configuration { "mingw*" or "vs*" }
+ targetextension ".exe"
+
+ configuration { "rpi" }
+ targetextension ""
+
+
configuration { }
links {
- "gtest",
"utils",
ext_lib("expat"),
ext_lib("zlib"),
@@ -68,7 +74,7 @@ project("mametests")
}
includedirs {
- MAME_DIR .. "3rdparty/googletest/googletest/include",
+ MAME_DIR .. "3rdparty/catch/single_include",
MAME_DIR .. "src/osd",
MAME_DIR .. "src/emu",
MAME_DIR .. "src/lib/util",
@@ -79,6 +85,7 @@ project("mametests")
files {
MAME_DIR .. "tests/main.cpp",
MAME_DIR .. "tests/lib/util/corestr.cpp",
+ MAME_DIR .. "tests/lib/util/options.cpp",
MAME_DIR .. "tests/emu/attotime.cpp",
}