diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-05-18 20:14:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-05-18 20:14:01 +0300 |
commit | dffd0a4a8e99196ad27f8fde2430b09dd29cac57 (patch) | |
tree | c9e4b9401844577805731686448a33bba1f10c2d /src | |
parent | 7b3cf825ebf4f87cb6b1bf7c0a2107c4b2774766 (diff) | |
download | plus-dffd0a4a8e99196ad27f8fde2430b09dd29cac57.tar.gz plus-dffd0a4a8e99196ad27f8fde2430b09dd29cac57.tar.bz2 plus-dffd0a4a8e99196ad27f8fde2430b09dd29cac57.tar.xz plus-dffd0a4a8e99196ad27f8fde2430b09dd29cac57.zip |
Move catch.hpp into test directory.
Also replace include catch.hpp into generic unittests.h
Diffstat (limited to 'src')
32 files changed, 76 insertions, 35 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 3165918dd..7045e80b5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -987,7 +987,6 @@ SRC = ${BASE_SRC} \ guild.h \ spellmanager.cpp \ spellmanager.h \ - catch.hpp \ chatlogger.cpp \ chatlogger.h \ gui/shortcut/shortcutbase.cpp \ @@ -1988,6 +1987,8 @@ manaplustests_CXXFLAGS += -DOPENGLERRORS endif manaplustests_SOURCES = ${SRC} \ + test/catch.hpp \ + test/unittests.h \ enums/render/mockdrawtype.h \ render/mockdrawitem.h \ render/mockgraphics.cc \ diff --git a/src/configuration_unittest.cc b/src/configuration_unittest.cc index 2e61c0669..7668e668b 100644 --- a/src/configuration_unittest.cc +++ b/src/configuration_unittest.cc @@ -18,7 +18,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" + #include "configuration.h" #include "configmanager.h" #include "dirs.h" diff --git a/src/enums/enums_unittest.cc b/src/enums/enums_unittest.cc index 5822005b1..3ba1e631d 100644 --- a/src/enums/enums_unittest.cc +++ b/src/enums/enums_unittest.cc @@ -18,7 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" #include "enums/being/gender.h" diff --git a/src/fs/files_unittest.cc b/src/fs/files_unittest.cc index 05953f04f..856162780 100644 --- a/src/fs/files_unittest.cc +++ b/src/fs/files_unittest.cc @@ -18,11 +18,12 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "fs/files.h" +#include "test/unittests.h" -#include "catch.hpp" #include "logger.h" +#include "fs/files.h" + #include "fs/virtfs/fs.h" #include "fs/virtfs/tools.h" diff --git a/src/fs/virtfs/virtfs1_unittest.cc b/src/fs/virtfs/virtfs1_unittest.cc index 5b8059002..d7bf52006 100644 --- a/src/fs/virtfs/virtfs1_unittest.cc +++ b/src/fs/virtfs/virtfs1_unittest.cc @@ -18,7 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" #include "fs/files.h" diff --git a/src/fs/virtfs/virtfs_unittest.cc b/src/fs/virtfs/virtfs_unittest.cc index 24b9232fc..89676ce04 100644 --- a/src/fs/virtfs/virtfs_unittest.cc +++ b/src/fs/virtfs/virtfs_unittest.cc @@ -18,7 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" #include "fs/files.h" #include "fs/paths.h" diff --git a/src/fs/virtfs/zip_unittest.cc b/src/fs/virtfs/zip_unittest.cc index 09ebdb1f5..33755af87 100644 --- a/src/fs/virtfs/zip_unittest.cc +++ b/src/fs/virtfs/zip_unittest.cc @@ -18,7 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" #include "logger.h" diff --git a/src/gui/fonts/textchunklist_unittest.cc b/src/gui/fonts/textchunklist_unittest.cc index fa573228f..a06ec2785 100644 --- a/src/gui/fonts/textchunklist_unittest.cc +++ b/src/gui/fonts/textchunklist_unittest.cc @@ -18,7 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" #include "gui/fonts/font.h" #include "gui/fonts/textchunk.h" diff --git a/src/gui/widgets/browserbox_unittest.cc b/src/gui/widgets/browserbox_unittest.cc index bed2ec2bd..2c2a4f58f 100644 --- a/src/gui/widgets/browserbox_unittest.cc +++ b/src/gui/widgets/browserbox_unittest.cc @@ -18,7 +18,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" + #include "client.h" #include "configuration.h" #include "configmanager.h" diff --git a/src/gui/windowmanager_unittest.cc b/src/gui/windowmanager_unittest.cc index dd80b7d5d..094dab380 100644 --- a/src/gui/windowmanager_unittest.cc +++ b/src/gui/windowmanager_unittest.cc @@ -18,7 +18,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" + #include "client.h" #include "configmanager.h" #include "configuration.h" diff --git a/src/integrity_unittest.cc b/src/integrity_unittest.cc index 9b5c31455..7bb07d94f 100644 --- a/src/integrity_unittest.cc +++ b/src/integrity_unittest.cc @@ -18,7 +18,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" + #include "client.h" #include "logger.h" #include "graphicsmanager.h" diff --git a/src/maingui.cpp b/src/maingui.cpp index 4eb7c8624..37536470a 100644 --- a/src/maingui.cpp +++ b/src/maingui.cpp @@ -50,7 +50,7 @@ #ifdef UNITTESTS #define CATCH_CONFIG_RUNNER -#include "catch.hpp" +#include "test/catch.hpp" #else // UNITTESTS #include "utils/xml.h" #endif // UNITTESTS diff --git a/src/resources/dye/dye_unittest.cc b/src/resources/dye/dye_unittest.cc index b21b03016..7ea5793b6 100644 --- a/src/resources/dye/dye_unittest.cc +++ b/src/resources/dye/dye_unittest.cc @@ -18,7 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" #include "client.h" #include "graphicsmanager.h" diff --git a/src/resources/dye/dyepalette_unittest.cc b/src/resources/dye/dyepalette_unittest.cc index 338e7c23d..afa3d8878 100644 --- a/src/resources/dye/dyepalette_unittest.cc +++ b/src/resources/dye/dyepalette_unittest.cc @@ -18,7 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" #include "client.h" #include "configuration.h" diff --git a/src/resources/map/maplayer_unittest.cc b/src/resources/map/maplayer_unittest.cc index 1d9b515f7..692a4738f 100644 --- a/src/resources/map/maplayer_unittest.cc +++ b/src/resources/map/maplayer_unittest.cc @@ -18,7 +18,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" + #include "graphicsmanager.h" #include "being/localplayer.h" diff --git a/src/resources/map/speciallayer_unittest.cc b/src/resources/map/speciallayer_unittest.cc index 57dc3b98b..fea93e801 100644 --- a/src/resources/map/speciallayer_unittest.cc +++ b/src/resources/map/speciallayer_unittest.cc @@ -18,7 +18,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" + #include "client.h" #include "logger.h" diff --git a/src/resources/mstack_unittest.cc b/src/resources/mstack_unittest.cc index 02d14f215..305aee15f 100644 --- a/src/resources/mstack_unittest.cc +++ b/src/resources/mstack_unittest.cc @@ -18,7 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" #include "gui/cliprect.h" diff --git a/src/resources/resourcemanager/resourcemanager_unittest.cc b/src/resources/resourcemanager/resourcemanager_unittest.cc index 2595beb76..527274ae9 100644 --- a/src/resources/resourcemanager/resourcemanager_unittest.cc +++ b/src/resources/resourcemanager/resourcemanager_unittest.cc @@ -18,7 +18,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" + #include "client.h" #include "dirs.h" #include "logger.h" diff --git a/src/resources/sprite/animatedsprite_unittest.cc b/src/resources/sprite/animatedsprite_unittest.cc index 4f8053b57..dabadd21b 100644 --- a/src/resources/sprite/animatedsprite_unittest.cc +++ b/src/resources/sprite/animatedsprite_unittest.cc @@ -18,9 +18,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "resources/sprite/animatedsprite.h" +#include "test/unittests.h" -#include "catch.hpp" #include "configuration.h" #include "configmanager.h" #include "client.h" @@ -44,6 +43,8 @@ #include "resources/resourcemanager/resourcemanager.h" +#include "resources/sprite/animatedsprite.h" + #include "utils/env.h" #include "utils/delete2.h" #include "utils/mrand.h" diff --git a/src/catch.hpp b/src/test/catch.hpp index 64d1cafc4..64d1cafc4 100644 --- a/src/catch.hpp +++ b/src/test/catch.hpp diff --git a/src/test/unittests.h b/src/test/unittests.h new file mode 100644 index 000000000..18b371ebf --- /dev/null +++ b/src/test/unittests.h @@ -0,0 +1,26 @@ +/* + * The ManaPlus Client + * Copyright (C) 2017 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef UNITTESTS_H +#define UNITTESTS_H + +#include "test/catch.hpp" + +#endif // UNITTESTS_H diff --git a/src/utils/chatutils_unittest.cc b/src/utils/chatutils_unittest.cc index d07578992..875923d83 100644 --- a/src/utils/chatutils_unittest.cc +++ b/src/utils/chatutils_unittest.cc @@ -18,7 +18,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" + #include "client.h" #include "configuration.h" #include "configmanager.h" diff --git a/src/utils/checkutils_unittest.cc b/src/utils/checkutils_unittest.cc index 270b6df58..a3c101e02 100644 --- a/src/utils/checkutils_unittest.cc +++ b/src/utils/checkutils_unittest.cc @@ -18,7 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" #include "utils/checkutils.h" #include "utils/delete2.h" diff --git a/src/utils/dumplibs_unittest.cc b/src/utils/dumplibs_unittest.cc index dfe12dbf9..6aef5d933 100644 --- a/src/utils/dumplibs_unittest.cc +++ b/src/utils/dumplibs_unittest.cc @@ -18,7 +18,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" + #include "logger.h" #include "utils/delete2.h" diff --git a/src/utils/langs_unittest.cc b/src/utils/langs_unittest.cc index b6983eb14..b162fc001 100644 --- a/src/utils/langs_unittest.cc +++ b/src/utils/langs_unittest.cc @@ -18,12 +18,12 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "utils/langs.h" +#include "test/unittests.h" -#include "catch.hpp" #include "configuration.h" #include "utils/env.h" +#include "utils/langs.h" #include "debug.h" diff --git a/src/utils/mathutils_unittest.cc b/src/utils/mathutils_unittest.cc index 86551130f..6ec2ce831 100644 --- a/src/utils/mathutils_unittest.cc +++ b/src/utils/mathutils_unittest.cc @@ -18,9 +18,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "utils/mathutils.h" +#include "test/unittests.h" -#include "catch.hpp" +#include "utils/mathutils.h" #include "debug.h" diff --git a/src/utils/parameters_unittest.cc b/src/utils/parameters_unittest.cc index f95929220..6030c394e 100644 --- a/src/utils/parameters_unittest.cc +++ b/src/utils/parameters_unittest.cc @@ -18,7 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" #include "utils/parameters.h" diff --git a/src/utils/stringutils_unittest.cc b/src/utils/stringutils_unittest.cc index 9a99972b3..7a5508298 100644 --- a/src/utils/stringutils_unittest.cc +++ b/src/utils/stringutils_unittest.cc @@ -18,7 +18,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" + #include "configuration.h" #include "logger.h" diff --git a/src/utils/timer_unittest.cc b/src/utils/timer_unittest.cc index 95fddc911..41bfad48c 100644 --- a/src/utils/timer_unittest.cc +++ b/src/utils/timer_unittest.cc @@ -18,7 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" #include "const/utils/timer.h" diff --git a/src/utils/translation/poparser_unittest.cc b/src/utils/translation/poparser_unittest.cc index d4cf806dc..812472fb2 100644 --- a/src/utils/translation/poparser_unittest.cc +++ b/src/utils/translation/poparser_unittest.cc @@ -18,7 +18,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" + #include "client.h" #include "configuration.h" #include "configmanager.h" diff --git a/src/utils/xml_unittest.cc b/src/utils/xml_unittest.cc index 41297339c..dd5a2145e 100644 --- a/src/utils/xml_unittest.cc +++ b/src/utils/xml_unittest.cc @@ -18,7 +18,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "catch.hpp" +#include "test/unittests.h" + #include "client.h" #include "configuration.h" #include "configmanager.h" diff --git a/src/utils/xmlutils_unittest.cc b/src/utils/xmlutils_unittest.cc index 3d9983d7e..eaf3097f3 100644 --- a/src/utils/xmlutils_unittest.cc +++ b/src/utils/xmlutils_unittest.cc @@ -18,9 +18,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "utils/xmlutils.h" +#include "test/unittests.h" -#include "catch.hpp" #include "client.h" #include "graphicsmanager.h" @@ -31,6 +30,7 @@ #include "gui/gui.h" #include "utils/delete2.h" +#include "utils/xmlutils.h" #include "render/sdlgraphics.h" |