summaryrefslogtreecommitdiff
path: root/tests/libpeas
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2019-11-15 16:55:58 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2020-10-09 09:32:27 +0800
commita3bd59bf7b2441c4575b0d82c671684df89d5243 (patch)
treef0d6dd72e28a3b0125b2b247f44fe94cba7d56a9 /tests/libpeas
parentc34c89ca4ac5b1688e580341e8703fbbdd79dfda (diff)
downloadlibpeas-a3bd59bf7b2441c4575b0d82c671684df89d5243.tar.gz
tests: Ensure symbols are exported on MSVC builds
Use a macro that is defined appropriately so that we also export the symbols of the test DLLs on Visual Studio builds as well.
Diffstat (limited to 'tests/libpeas')
-rw-r--r--tests/libpeas/introspection/introspection-abstract.h7
-rw-r--r--tests/libpeas/introspection/introspection-base.h7
-rw-r--r--tests/libpeas/introspection/introspection-callable.h10
-rw-r--r--tests/libpeas/introspection/introspection-has-prerequisite.h3
-rw-r--r--tests/libpeas/introspection/introspection-prerequisite.h3
-rw-r--r--tests/libpeas/introspection/introspection-unimplemented.h3
-rw-r--r--tests/libpeas/plugins/embedded/embedded-plugin.h3
-rw-r--r--tests/libpeas/testing/testing-extension.h7
-rw-r--r--tests/libpeas/testing/testing.h2
9 files changed, 45 insertions, 0 deletions
diff --git a/tests/libpeas/introspection/introspection-abstract.h b/tests/libpeas/introspection/introspection-abstract.h
index bfff2c4..2b02c8e 100644
--- a/tests/libpeas/introspection/introspection-abstract.h
+++ b/tests/libpeas/introspection/introspection-abstract.h
@@ -24,6 +24,8 @@
#include <libpeas/peas.h>
+#include "../../testing-util/peas-test-common.h"
+
G_BEGIN_DECLS
/*
@@ -49,9 +51,14 @@ struct _IntrospectionAbstractClass {
/*
* Public methods
*/
+PEAS_TEST_EXPORT
GType introspection_abstract_get_type (void) G_GNUC_CONST;
+
+PEAS_TEST_EXPORT
gint introspection_abstract_get_value (IntrospectionAbstract *abstract);
+
+PEAS_TEST_EXPORT
void introspection_abstract_set_value (IntrospectionAbstract *abstract,
gint value);
diff --git a/tests/libpeas/introspection/introspection-base.h b/tests/libpeas/introspection/introspection-base.h
index 64b052f..06b2ba3 100644
--- a/tests/libpeas/introspection/introspection-base.h
+++ b/tests/libpeas/introspection/introspection-base.h
@@ -24,6 +24,8 @@
#include <libpeas/peas.h>
+#include "../../testing-util/peas-test-common.h"
+
G_BEGIN_DECLS
/*
@@ -49,9 +51,14 @@ struct _IntrospectionBaseInterface {
/*
* Public methods
*/
+PEAS_TEST_EXPORT
GType introspection_base_get_type (void) G_GNUC_CONST;
+
+PEAS_TEST_EXPORT
const PeasPluginInfo *introspection_base_get_plugin_info (IntrospectionBase *base);
+
+PEAS_TEST_EXPORT
GSettings *introspection_base_get_settings (IntrospectionBase *base);
G_END_DECLS
diff --git a/tests/libpeas/introspection/introspection-callable.h b/tests/libpeas/introspection/introspection-callable.h
index 69c0fd0..4f8f525 100644
--- a/tests/libpeas/introspection/introspection-callable.h
+++ b/tests/libpeas/introspection/introspection-callable.h
@@ -24,6 +24,8 @@
#include <glib-object.h>
+#include "../../testing-util/peas-test-common.h"
+
G_BEGIN_DECLS
/*
@@ -58,13 +60,21 @@ struct _IntrospectionCallableInterface {
/*
* Public methods
*/
+PEAS_TEST_EXPORT
GType introspection_callable_get_type (void) G_GNUC_CONST;
+PEAS_TEST_EXPORT
gchar *introspection_callable_call_with_return (IntrospectionCallable *callable);
+
+PEAS_TEST_EXPORT
void introspection_callable_call_no_args (IntrospectionCallable *callable);
+
+PEAS_TEST_EXPORT
void introspection_callable_call_single_arg (IntrospectionCallable *callable,
gboolean *called);
+
+PEAS_TEST_EXPORT
void introspection_callable_call_multi_args (IntrospectionCallable *callable,
gint in,
gint *out,
diff --git a/tests/libpeas/introspection/introspection-has-prerequisite.h b/tests/libpeas/introspection/introspection-has-prerequisite.h
index 61e13bf..29d25e4 100644
--- a/tests/libpeas/introspection/introspection-has-prerequisite.h
+++ b/tests/libpeas/introspection/introspection-has-prerequisite.h
@@ -24,6 +24,8 @@
#include <glib-object.h>
+#include "../../testing-util/peas-test-common.h"
+
G_BEGIN_DECLS
/*
@@ -45,6 +47,7 @@ struct _IntrospectionHasPrerequisiteInterface {
/*
* Public methods
*/
+PEAS_TEST_EXPORT
GType introspection_has_prerequisite_get_type (void) G_GNUC_CONST;
G_END_DECLS
diff --git a/tests/libpeas/introspection/introspection-prerequisite.h b/tests/libpeas/introspection/introspection-prerequisite.h
index f600d9f..f9f2c85 100644
--- a/tests/libpeas/introspection/introspection-prerequisite.h
+++ b/tests/libpeas/introspection/introspection-prerequisite.h
@@ -24,6 +24,8 @@
#include <libpeas/peas.h>
+#include "../../testing-util/peas-test-common.h"
+
G_BEGIN_DECLS
/*
@@ -49,6 +51,7 @@ struct _IntrospectionPrerequisiteClass {
/*
* Public methods
*/
+PEAS_TEST_EXPORT
GType introspection_prerequisite_get_type (void) G_GNUC_CONST;
G_END_DECLS
diff --git a/tests/libpeas/introspection/introspection-unimplemented.h b/tests/libpeas/introspection/introspection-unimplemented.h
index 832ab88..f4c6dc8 100644
--- a/tests/libpeas/introspection/introspection-unimplemented.h
+++ b/tests/libpeas/introspection/introspection-unimplemented.h
@@ -24,6 +24,8 @@
#include <glib-object.h>
+#include "../../testing-util/peas-test-common.h"
+
G_BEGIN_DECLS
/*
@@ -45,6 +47,7 @@ struct _IntrospectionUnimplementedInterface {
/*
* Public methods
*/
+PEAS_TEST_EXPORT
GType introspection_unimplemented_get_type (void) G_GNUC_CONST;
G_END_DECLS
diff --git a/tests/libpeas/plugins/embedded/embedded-plugin.h b/tests/libpeas/plugins/embedded/embedded-plugin.h
index b4111e5..122c5a3 100644
--- a/tests/libpeas/plugins/embedded/embedded-plugin.h
+++ b/tests/libpeas/plugins/embedded/embedded-plugin.h
@@ -24,6 +24,8 @@
#include <libpeas/peas.h>
+#include "../../../testing-util/peas-test-common.h"
+
G_BEGIN_DECLS
#define TESTING_TYPE_EMBEDDED_PLUGIN (testing_embedded_plugin_get_type ())
@@ -44,6 +46,7 @@ struct _TestingEmbeddedPluginClass {
PeasExtensionBaseClass parent_class;
};
+PEAS_TEST_EXPORT
GType testing_embedded_plugin_get_type (void) G_GNUC_CONST;
G_MODULE_EXPORT void testing_embedded_plugin_register_types (PeasObjectModule *module);
diff --git a/tests/libpeas/testing/testing-extension.h b/tests/libpeas/testing/testing-extension.h
index 7794620..03f5a84 100644
--- a/tests/libpeas/testing/testing-extension.h
+++ b/tests/libpeas/testing/testing-extension.h
@@ -28,11 +28,18 @@
G_BEGIN_DECLS
+PEAS_TEST_EXPORT
void testing_extension_basic (const gchar *loader);
+
+PEAS_TEST_EXPORT
void testing_extension_callable (const gchar *loader);
+
+PEAS_TEST_EXPORT
void testing_extension_add (const gchar *path,
GTestDataFunc func);
+
+PEAS_TEST_EXPORT
int testing_extension_run_tests (void);
#define testing_extension_all(loader) \
diff --git a/tests/libpeas/testing/testing.h b/tests/libpeas/testing/testing.h
index d71fdbe..cdc9fdd 100644
--- a/tests/libpeas/testing/testing.h
+++ b/tests/libpeas/testing/testing.h
@@ -27,9 +27,11 @@
G_BEGIN_DECLS
+PEAS_TEST_EXPORT
void testing_init (gint *argc,
gchar ***argv);
+PEAS_TEST_EXPORT
PeasEngine *testing_engine_new_full (gboolean nonglobal_loaders);
#define testing_engine_new() (testing_engine_new_full (FALSE))