summaryrefslogtreecommitdiff
path: root/test cases/vala/21 type module/foo.vala
blob: 0a6322560b09bfc6cdca0847d8f4be4e769e764b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
public extern const string FOO_PLUGIN_PATH;

Foo.PluginModule plugin_module;

public int main () {
    plugin_module = new Foo.PluginModule (FOO_PLUGIN_PATH, "bar");

    if (!plugin_module.load ()) {
        return 1;
    }

    var plugin = Object.new (plugin_module.plugin_type) as Foo.Plugin;

    assert ("bar" == plugin.bar ());

    return 0;
}