#include "plugin.h" #include "test.h" #include typedef void (*SayHelloFunc)(void); TEST_CASE(test_hello_plugin) { PluginEngine* eng = new_plugin_engine(&(PluginEngineDesc){.plugins_dir = "."}); TEST_TRUE(eng != 0); Plugin* plugin = load_plugin(eng, "hello_plugin"); TEST_TRUE(plugin != 0); plugin_call(plugin, SayHelloFunc, "SayHello"); printf("Now modify the plugin, build it, and press enter"); fflush(stdout); getchar(); plugin_engine_update(eng); plugin_call(plugin, SayHelloFunc, "SayHello"); delete_plugin_engine(&eng); TEST_TRUE(eng == 0); } int main() { return 0; }