mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 00:28:21 +00:00
Adapting plugin tests to use the new split Plugin.{h,cc} structure
that init-plugin now generates. Also adding new test that makes sure the the skeleton created by init-plugin compiles on its own withoyt any further changes.
This commit is contained in:
parent
2a49932911
commit
ca1b882761
7 changed files with 98 additions and 82 deletions
|
@ -1,25 +1,20 @@
|
|||
|
||||
#include <plugin/Plugin.h>
|
||||
#include "Plugin.h"
|
||||
|
||||
#include "Foo.h"
|
||||
|
||||
namespace plugin {
|
||||
namespace Demo_Foo {
|
||||
namespace plugin { namespace Demo_Foo { Plugin plugin; } }
|
||||
|
||||
class Plugin : public plugin::Plugin {
|
||||
public:
|
||||
plugin::Configuration Configure()
|
||||
{
|
||||
AddComponent(new ::analyzer::Component("Foo", plugin::Demo_Foo::Foo::Instantiate));
|
||||
using namespace plugin::Demo_Foo;
|
||||
|
||||
plugin::Configuration config;
|
||||
config.name = "Demo::Foo";
|
||||
config.description = "A Foo test analyzer";
|
||||
config.version.major = 1;
|
||||
config.version.minor = 0;
|
||||
return config;
|
||||
}
|
||||
} plugin;
|
||||
plugin::Configuration Plugin::Configure()
|
||||
{
|
||||
AddComponent(new ::analyzer::Component("Foo", plugin::Demo_Foo::Foo::Instantiate));
|
||||
|
||||
}
|
||||
}
|
||||
plugin::Configuration config;
|
||||
config.name = "Demo::Foo";
|
||||
config.description = "A Foo test analyzer";
|
||||
config.version.major = 1;
|
||||
config.version.minor = 0;
|
||||
return config;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue