generic_create($factory, Champlain::MapSourceFactory->OSM_CYCLEMAP);
generic_create($factory, Champlain::MapSourceFactory->OAM);
generic_create($factory, Champlain::MapSourceFactory->MFF_RELIEF);
+
+ my @maps = $factory->get_list();
+ ok(@maps >= 5, "Maps factory has the default maps");
}
C_ARGS: /* No args */
-#gchar**
-#champlain_map_source_factory_get_list (ChamplainMapSourceFactory *factory)
+void
+champlain_map_source_factory_get_list (ChamplainMapSourceFactory *factory)
+ PREINIT:
+ gchar **list = NULL;
+ gchar *item = NULL;
+ gint i = 0;
+
+ PPCODE:
+ list = champlain_map_source_factory_get_list(factory);
+
+ item = list[0];
+ while (item != NULL) {
+ XPUSHs(sv_2mortal(newSVGChar(item)));
+ item = list[++i];
+ }
+
+ g_strfreev(list);
ChamplainMapSource*