summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-10-16 03:06:13 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-10-16 10:18:39 -0700
commit33bbbf30f461b030c04e4de866cafafce19d5232 (patch)
treed4b25be7d7538f108eddcdb15b06d5459dfdcace /src
parenta92502ebf69c011c0ee487921b2829686be60e15 (diff)
downloadtmwa-33bbbf30f461b030c04e4de866cafafce19d5232.tar.gz
tmwa-33bbbf30f461b030c04e4de866cafafce19d5232.tar.bz2
tmwa-33bbbf30f461b030c04e4de866cafafce19d5232.tar.xz
tmwa-33bbbf30f461b030c04e4de866cafafce19d5232.zip
Split tests a lot
This probably takes longer for a from-scratch compile, but saves big on incremental recompiles.
Diffstat (limited to 'src')
-rw-r--r--src/compat/option.py2
-rw-r--r--src/ints/wrap.py5
-rw-r--r--src/map/script-persist.py1
-rw-r--r--src/tests/test.cpp33
4 files changed, 8 insertions, 33 deletions
diff --git a/src/compat/option.py b/src/compat/option.py
index 60a98d9..7704174 100644
--- a/src/compat/option.py
+++ b/src/compat/option.py
@@ -26,6 +26,8 @@ class Option(object):
return 'None<%s>' % ty
test_extra = '''
+ #include "../compat/borrow.hpp"
+
static int option_borrow_thingy;
'''
diff --git a/src/ints/wrap.py b/src/ints/wrap.py
index c8a8c6d..d5a6e99 100644
--- a/src/ints/wrap.py
+++ b/src/ints/wrap.py
@@ -9,5 +9,10 @@ class Wrapped(object):
def to_string(self):
return self._value['_value']
+ test_extra = '''
+ void do_breakpoint();
+ void do_breakpoint() {}
+ '''
+
# tests are in src/mmo/ids.py instead
tests = []
diff --git a/src/map/script-persist.py b/src/map/script-persist.py
index df60cf4..a970cc5 100644
--- a/src/map/script-persist.py
+++ b/src/map/script-persist.py
@@ -2,6 +2,7 @@ class script_data(object):
enabled = True
test_extra = '''
+ #include "../strings/literal.hpp"
using tmwa::operator "" _s;
#include "../map/script-parse-internal.hpp"
diff --git a/src/tests/test.cpp b/src/tests/test.cpp
deleted file mode 100644
index d731d7c..0000000
--- a/src/tests/test.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-// test.cpp - Driver for testwuite
-//
-// Copyright © 2013 Ben Longbons <b.r.longbons@gmail.com>
-//
-// This file is part of The Mana World (Athena server)
-//
-// 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 3 of the License, or
-// (at your option) 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/>.
-
-#include <gtest/gtest.h>
-
-#include "../poison.hpp"
-
-
-namespace tmwa
-{
-} // namespace tmwa
-
-int main(int argc, char **argv)
-{
- ::testing::InitGoogleTest(&argc, argv);
- return RUN_ALL_TESTS();
-}