Skip to content

Commit

Permalink
Merge branch 'integrate-new-graph-features' of github.com:emsec/hal i…
Browse files Browse the repository at this point in the history
…nto integrate-new-graph-features
  • Loading branch information
not-a-trojan committed Dec 13, 2019
2 parents 673236b + 36b4567 commit 6912596
Show file tree
Hide file tree
Showing 15 changed files with 754 additions and 871 deletions.
5 changes: 2 additions & 3 deletions tests/core/plugin_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <core/plugin_manager.h>
#include <iostream>


#ifdef FIXME

using std::cout;
Expand Down Expand Up @@ -328,7 +327,7 @@ TEST_F(plugin_manager_test, check_cli_plugin_options)
*
* Functions: get_plugin_factory
*/
TEST_F(plugin_manager_test, check_get_plugin_factory)
/*TEST_F(plugin_manager_test, check_get_plugin_factory)
{
TEST_START
// ########################
Expand Down Expand Up @@ -366,7 +365,7 @@ TEST_F(plugin_manager_test, check_get_plugin_factory)
TEST_END
}

*/
/**
* Testing the get_plugin_instance function
*
Expand Down
7 changes: 5 additions & 2 deletions tests/core/test_plugin/include/factory_test_plugin.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@

#ifndef HAL_FACTORY_TEST_PLUGIN_H
#define HAL_FACTORY_TEST_PLUGIN_H
/* FIXME

#ifdef REMOVE_ME

#include "core/interface_factory.h"

class PLUGIN_API factory_test_plugin : public i_factory
Expand All @@ -16,6 +18,7 @@ class PLUGIN_API factory_test_plugin : public i_factory
};

extern "C" PLUGIN_API i_factory* get_factory();
*/

#endif // REMOVE_ME

#endif //HAL_FACTORY_TEST_PLUGIN_H
20 changes: 3 additions & 17 deletions tests/core/test_plugin/include/plugin_test_plugin.h
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
//
// Created by ubuntu on 9/28/19.
//

#ifndef HAL_PLUGIN_TEST_PLUGIN_H
#define HAL_PLUGIN_TEST_PLUGIN_H


#include "core/interface_base.h"

//#include <hal_bdd.h>

#include <igraph/igraph.h>
#include "core/interface_cli.h"
#include "core/interface_base.h"

Expand All @@ -19,7 +10,6 @@ class netlist;
class gate;
class net;

#ifdef FIXME

class PLUGIN_API plugin_test_plugin : virtual public i_cli
{
Expand All @@ -35,24 +25,20 @@ class PLUGIN_API plugin_test_plugin : virtual public i_cli
*/

/** interface implementation: i_base */
std::string get_name() override;

/** interface implementation: i_base */
std::string get_version() override;
std::string get_name() const override;

/** interface implementation: i_base */
std::set<interface_type> get_type() override;
std::string get_version() const override;


/** interface implementation: i_cli */
program_options get_cli_options() override;
program_options get_cli_options() const override;



/** interface implementation: i_cli */
bool handle_cli_call(std::shared_ptr<netlist> nl, program_arguments& args) override;

};
#endif // FIXME

#endif //HAL_PLUGIN_TEST_PLUGIN_H
7 changes: 5 additions & 2 deletions tests/core/test_plugin/src/factory_test_plugin.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "factory_test_plugin.h"
#include "plugin_test_plugin.h"
/* FIXME

#ifdef REMOVE_ME

std::shared_ptr<i_base> factory_test_plugin::get_plugin_instance()
{
return std::dynamic_pointer_cast<i_base>(std::make_shared<plugin_test_plugin>());
Expand All @@ -11,4 +13,5 @@ extern i_factory* get_factory()
static factory_test_plugin* factory = new factory_test_plugin();
return (i_factory*)factory;
}
*/

#endif // REMOVE_ME
12 changes: 6 additions & 6 deletions tests/core/test_plugin/src/plugin_test_plugin.cpp
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
#include "plugin_test_plugin.h"
#include "core/log.h"
/* FIXME
std::string plugin_test_plugin::get_name()

std::string plugin_test_plugin::get_name() const
{
return std::string("test_plugin");
}

std::string plugin_test_plugin::get_version()
std::string plugin_test_plugin::get_version() const
{
return std::string("1.2.3");
}

/*
std::set<interface_type> plugin_test_plugin::get_type()
{
return std::set<interface_type>{interface_type::base, interface_type::cli};
}
}*/


program_options plugin_test_plugin::get_cli_options()
program_options plugin_test_plugin::get_cli_options() const
{
program_options description;
description.add("--option_one", "option_one_description");
Expand All @@ -31,4 +32,3 @@ bool plugin_test_plugin::handle_cli_call(std::shared_ptr<netlist> nl, program_ar
UNUSED(args);
return true;
}
*/
Loading

0 comments on commit 6912596

Please sign in to comment.