Skip to content
Snippets Groups Projects
Commit 4752c118 authored by Rosen Matev's avatar Rosen Matev :sunny:
Browse files

Fix configuration of functor testing algorithms

The bad configuration was silently ignored (see
gaudi/Gaudi#163 and gaudi/Gaudi!1265 ) and as a result no
functors were built (into the cache) or tested.
parent 9a90d80e
No related branches found
No related tags found
No related merge requests found
......@@ -21,8 +21,6 @@
#include <Gaudi/Parsers/Factory.h>
namespace ThOr {
using parsing_type = std::tuple<std::string, std::vector<std::string>, std::string>;
struct FunctorDesc {
std::string code{};
std::vector<std::string> headers{};
......
......@@ -24,6 +24,6 @@ def pack_dict(input_dict, wrap=None):
if wrap is not None:
input_dict = {k: wrap(v) for k, v in input_dict.items()}
return {
k: [v.code(), v.code_repr()] + v.headers()
k: (v.code(), v.headers(), v.code_repr())
for k, v in input_dict.items()
}
......@@ -79,6 +79,7 @@ namespace {
template <typename T>
struct InstantiateFunctors final : public base_t<T> {
using base_t<T>::base_t;
using base_t<T>::warning;
using base_t<T>::info;
using base_t<T>::debug;
using base_t<T>::msgLevel;
......@@ -93,6 +94,7 @@ struct InstantiateFunctors final : public base_t<T> {
if ( cut ) { info() << "Cut return type is " << System::typeinfoName( cut.rtype() ) << endmsg; }
}
auto const& map = this->template getFunctorMap<Func<T>>();
if ( map.empty() ) { warning() << "Functor map is empty!" << endmsg; }
for ( auto const& [nickname, func] : map ) {
if ( func ) {
info() << "Function " << nickname << " return type is " << System::typeinfoName( func.rtype() ) << endmsg;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment