This resolves a long-standing issue: we could not use proper include paths for test-helper code that was defined alongside the tests. Since some test-helper code must now be relocated into the »Vault«-Layer, I took the opportunity to finally resolve this annoyance. The solution is two-fold * introduce a dedicated test-support library * remove the quirks that were necessary to support some plain-C tests Together, this allows to raise the include-directory by one level, and then to adjust all folder names so that they match the namespace
50 lines
1 KiB
C++
50 lines
1 KiB
C++
/*
|
||
DUMMY-FUNCTIONS - mock functions for checking functor utils
|
||
|
||
Copyright (C)
|
||
2009, Hermann Vosseler <Ichthyostega@web.de>
|
||
|
||
**Lumiera** 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 (at your
|
||
option) any later version. See the file COPYING for further details.
|
||
|
||
* *****************************************************************/
|
||
|
||
/** @file dummy-functions.hpp
|
||
** dummy functions to support unit testing of function metaprogramming helpers
|
||
*/
|
||
|
||
|
||
#ifndef LIB_META_DUMMY_FUNCTIONS_H
|
||
#define LIB_META_DUMMY_FUNCTIONS_H
|
||
|
||
|
||
|
||
|
||
namespace lib {
|
||
namespace meta {
|
||
namespace test {
|
||
|
||
|
||
namespace { // test helpers
|
||
|
||
int _sum_ =0; ///< used to verify the effect of testFunc
|
||
|
||
void
|
||
testFunc (int i, char c)
|
||
{
|
||
_sum_ += i + c;
|
||
}
|
||
|
||
int
|
||
returnIt ()
|
||
{
|
||
return _sum_;
|
||
}
|
||
}
|
||
|
||
|
||
|
||
}}} // namespace lib::meta::test
|
||
#endif
|