From 33bbbf30f461b030c04e4de866cafafce19d5232 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Thu, 16 Oct 2014 03:06:13 -0700 Subject: Split tests a lot This probably takes longer for a from-scratch compile, but saves big on incremental recompiles. --- src/compat/option.py | 2 ++ src/ints/wrap.py | 5 +++++ src/map/script-persist.py | 1 + src/tests/test.cpp | 33 --------------------------------- 4 files changed, 8 insertions(+), 33 deletions(-) delete mode 100644 src/tests/test.cpp (limited to 'src') 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 -// -// 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 . - -#include - -#include "../poison.hpp" - - -namespace tmwa -{ -} // namespace tmwa - -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} -- cgit v1.2.3-60-g2f50