celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpe...@apache.org
Subject celix git commit: CELIX-290: fixed cmake warning in framework/CMakelist.txt (removed brackets from [COPYONLY] at line 351/353), fixed build warning in framework bundle_cache_test.cpp (mktemp depricated, used mkstemp instead), fixed a dev note accidentaly
Date Wed, 11 Nov 2015 20:57:38 GMT
Repository: celix
Updated Branches:
  refs/heads/develop b30775738 -> 1b7b3e8b9


CELIX-290: fixed cmake warning in framework/CMakelist.txt (removed brackets from [COPYONLY] at line 351/353),
fixed build warning in framework bundle_cache_test.cpp (mktemp depricated, used mkstemp instead),
fixed a dev note accidentaly left in framework service_registry_test.cpp (used preprocessor symbol as dev note, will not do again),
fixed a lot of the framework mocks, used to not assign any of the output parameters, resulting in undefined behaviour,
updated most framework tests to accommodate for the mock changes,
expanded framework resolver test (WIP)


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/1b7b3e8b
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/1b7b3e8b
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/1b7b3e8b

Branch: refs/heads/develop
Commit: 1b7b3e8b95ad175b631f3ad1e43c3fcf7b0fbe0a
Parents: b307757
Author: Bjoern Petri <bpetri@apache.org>
Authored: Wed Nov 11 21:55:47 2015 +0100
Committer: Bjoern Petri <bpetri@apache.org>
Committed: Wed Nov 11 21:55:47 2015 +0100

----------------------------------------------------------------------
 framework/CMakeLists.txt                        |  10 +-
 framework/private/mock/bundle_archive_mock.c    |  38 +++-
 framework/private/mock/bundle_cache_mock.c      |  15 +-
 framework/private/mock/bundle_context_mock.c    |  28 ++-
 framework/private/mock/bundle_mock.c            |  48 +++--
 framework/private/mock/bundle_revision_mock.c   |  19 +-
 framework/private/mock/capability_mock.c        |   9 +-
 framework/private/mock/filter_mock.c            |  15 +-
 framework/private/mock/framework_mock.c         |  11 +-
 framework/private/mock/manifest_mock.c          |   4 +-
 framework/private/mock/manifest_parser_mock.c   |  12 +-
 framework/private/mock/requirement_mock.c       |   1 -
 framework/private/mock/service_reference_mock.c |  12 +-
 framework/private/mock/service_registry_mock.c  |  53 +++++-
 .../mock/service_tracker_customizer_mock.c      |   8 +-
 framework/private/resources-test/properties.txt |   4 +-
 framework/private/src/resolver.c                |   4 +-
 framework/private/test/bundle_cache_test.cpp    |   4 +-
 framework/private/test/bundle_test.cpp          |  10 +-
 framework/private/test/capability_test.cpp      |  10 +-
 framework/private/test/framework_test.cpp       |   2 +-
 framework/private/test/module_test.cpp          | 175 +++++++++++------
 framework/private/test/requirement_test.cpp     |  10 +-
 framework/private/test/resolver_test.cpp        | 189 ++++++++++++++-----
 .../private/test/service_reference_test.cpp     |   1 -
 .../private/test/service_registration_test.cpp  |   4 +-
 .../private/test/service_registry_test.cpp      |   5 +-
 framework/private/test/service_tracker_test.cpp |  32 ++--
 framework/private/test/version_range_test.cpp   |  40 +++-
 framework/tst/CMakeLists.txt                    |   2 +-
 utils/private/test/celix_threads_test.cpp       |   2 +-
 31 files changed, 557 insertions(+), 220 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/framework/CMakeLists.txt b/framework/CMakeLists.txt
index bf60b9e..7b447d3 100644
--- a/framework/CMakeLists.txt
+++ b/framework/CMakeLists.txt
@@ -259,8 +259,8 @@ if (FRAMEWORK)
             private/mock/requirement_mock.c
             private/mock/capability_mock.c
             private/mock/manifest_parser_mock.c
-            private/mock/wire_mock.c
             private/mock/version_mock.c
+            private/src/wire.c
             private/src/module.c
             private/src/resolver.c
             private/src/celix_errorcodes.c
@@ -348,9 +348,9 @@ if (FRAMEWORK)
 	        private/test/wire_test.cpp) 
 		target_link_libraries(wire_test ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY})
 		
-		configure_file(private/resources-test/manifest_sections.txt ${CMAKE_BINARY_DIR}/framework/resources-test/manifest_sections.txt [COPYONLY])
-		configure_file(private/resources-test/manifest.txt ${CMAKE_BINARY_DIR}/framework/resources-test/manifest.txt [COPYONLY])
-		configure_file(private/resources-test/properties.txt ${CMAKE_BINARY_DIR}/framework/resources-test/properties.txt [COPYONLY])
+		configure_file(private/resources-test/manifest_sections.txt ${CMAKE_BINARY_DIR}/framework/resources-test/manifest_sections.txt COPYONLY)
+		configure_file(private/resources-test/manifest.txt ${CMAKE_BINARY_DIR}/framework/resources-test/manifest.txt COPYONLY)
+		configure_file(private/resources-test/properties.txt ${CMAKE_BINARY_DIR}/framework/resources-test/properties.txt COPYONLY)
 				
 		#set_target_properties(wire_test PROPERTIES COMPILE_FLAGS "-include ${CPPUTEST_INCLUDE_DIR}/CppUTest/MemoryLeakDetectorMallocMacros.h -include ${CPPUTEST_INCLUDE_DIR}/CppUTest/MemoryLeakDetectorNewMacros.h")
 			
@@ -381,7 +381,7 @@ if (FRAMEWORK)
 	     add_test(NAME wire_test COMMAND wire_test)
 	    
 	     SETUP_TARGET_FOR_COVERAGE(attribute_test attribute_test ${CMAKE_BINARY_DIR}/coverage/attribute_test/attribute_test)
-        SETUP_TARGET_FOR_COVERAGE(bundle_archive_test bundle_archive_test ${CMAKE_BINARY_DIR}/coverage/bundle_archive/bundle_archive_test)
+        SETUP_TARGET_FOR_COVERAGE(bundle_archive_test bundle_archive_test ${CMAKE_BINARY_DIR}/coverage/bundle_archive_test/bundle_archive_test)
         SETUP_TARGET_FOR_COVERAGE(bundle_cache_test bundle_cache_test ${CMAKE_BINARY_DIR}/coverage/bundle_cache_test/bundle_cache_test)
         SETUP_TARGET_FOR_COVERAGE(bundle_context_test bundle_context_test ${CMAKE_BINARY_DIR}/coverage/bundle_context_test/bundle_context_test)
         SETUP_TARGET_FOR_COVERAGE(bundle_revision_test bundle_revision_test ${CMAKE_BINARY_DIR}/coverage/bundle_revision_test/bundle_revision_test)

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/mock/bundle_archive_mock.c
----------------------------------------------------------------------
diff --git a/framework/private/mock/bundle_archive_mock.c b/framework/private/mock/bundle_archive_mock.c
index d9b416c..6493c79 100644
--- a/framework/private/mock/bundle_archive_mock.c
+++ b/framework/private/mock/bundle_archive_mock.c
@@ -63,27 +63,39 @@ celix_status_t bundleArchive_getId(bundle_archive_pt archive, long *id) {
 }
 
 celix_status_t bundleArchive_getLocation(bundle_archive_pt archive, char **location) {
-	mock_c()->actualCall("bundleArchive_getLocation");
+	mock_c()->actualCall("bundleArchive_getLocation")
+			->withPointerParameters("archive", archive)
+			->withOutputParameter("location", location);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t bundleArchive_getArchiveRoot(bundle_archive_pt archive, char **archiveRoot) {
-	mock_c()->actualCall("bundleArchive_getArchiveRoot");
+	mock_c()->actualCall("bundleArchive_getArchiveRoot")
+			->withPointerParameters("archive", archive)
+			->withOutputParameter("archiveRoot", archiveRoot);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t bundleArchive_revise(bundle_archive_pt archive, char * location, char *inputFile) {
-	mock_c()->actualCall("bundleArchive_revise");
+	mock_c()->actualCall("bundleArchive_revise")
+			->withPointerParameters("archive", archive)
+			->withStringParameters("location", location)
+			->withStringParameters("inputFile", inputFile);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t bundleArchive_rollbackRevise(bundle_archive_pt archive, bool *rolledback) {
-	mock_c()->actualCall("bundleArchive_rollbackRevise");
+	mock_c()->actualCall("bundleArchive_rollbackRevise")
+			->withPointerParameters("archive", archive)
+			->withOutputParameter("rolledback", rolledback);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t bundleArchive_getRevision(bundle_archive_pt archive, long revNr, bundle_revision_pt *revision) {
-	mock_c()->actualCall("bundleArchive_getRevision");
+	mock_c()->actualCall("bundleArchive_getRevision")
+			->withPointerParameters("archive", archive)
+			->withLongIntParameters("revNr", revNr)
+			->withOutputParameter("revision", revision);
 	return mock_c()->returnValue().value.intValue;
 }
 
@@ -95,12 +107,16 @@ celix_status_t bundleArchive_getCurrentRevision(bundle_archive_pt archive, bundl
 }
 
 celix_status_t bundleArchive_getCurrentRevisionNumber(bundle_archive_pt archive, long *revisionNumber) {
-	mock_c()->actualCall("bundleArchive_getCurrentRevisionNumber");
+	mock_c()->actualCall("bundleArchive_getCurrentRevisionNumber")
+			->withPointerParameters("archive", archive)
+			->withOutputParameter("revisionNumber", revisionNumber);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t bundleArchive_getRefreshCount(bundle_archive_pt archive, long *refreshCount) {
-	mock_c()->actualCall("bundleArchive_getRefreshCount");
+	mock_c()->actualCall("bundleArchive_getRefreshCount")
+			->withPointerParameters("archive", archive)
+			->withOutputParameter("refreshCount", refreshCount);
 	return mock_c()->returnValue().value.intValue;
 }
 
@@ -126,7 +142,9 @@ celix_status_t bundleArchive_setLastModified(bundle_archive_pt archive, time_t l
 }
 
 celix_status_t bundleArchive_getLastModified(bundle_archive_pt archive, time_t *lastModified) {
-	mock_c()->actualCall("bundleArchive_getLastModified");
+	mock_c()->actualCall("bundleArchive_getLastModified")
+			->withPointerParameters("archive", archive)
+			->withOutputParameter("lastModified", lastModified);
 	return mock_c()->returnValue().value.intValue;
 }
 
@@ -138,7 +156,9 @@ celix_status_t bundleArchive_setPersistentState(bundle_archive_pt archive, bundl
 }
 
 celix_status_t bundleArchive_getPersistentState(bundle_archive_pt archive, bundle_state_e *state) {
-	mock_c()->actualCall("bundleArchive_getPersistentState");
+	mock_c()->actualCall("bundleArchive_getPersistentState")
+			->withPointerParameters("archive", archive)
+			->withOutputParameter("state", state);
 	return mock_c()->returnValue().value.intValue;
 }
 

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/mock/bundle_cache_mock.c
----------------------------------------------------------------------
diff --git a/framework/private/mock/bundle_cache_mock.c b/framework/private/mock/bundle_cache_mock.c
index 925245d..ac9f61c 100644
--- a/framework/private/mock/bundle_cache_mock.c
+++ b/framework/private/mock/bundle_cache_mock.c
@@ -28,7 +28,9 @@
 #include "bundle_cache.h"
 
 celix_status_t bundleCache_create(properties_pt configurationMap, bundle_cache_pt *bundle_cache) {
-	mock_c()->actualCall("bundleCache_create");
+	mock_c()->actualCall("bundleCache_create")
+		->withPointerParameters("configurationMap", configurationMap)
+		->withOutputParameter("bundle_cache", bundle_cache);
 	return mock_c()->returnValue().value.intValue;
 }
 
@@ -38,12 +40,19 @@ celix_status_t bundleCache_destroy(bundle_cache_pt *cache) {
 }
 
 celix_status_t bundleCache_getArchives(bundle_cache_pt cache, array_list_pt *archives) {
-	mock_c()->actualCall("bundleCache_getArchives");
+	mock_c()->actualCall("bundleCache_getArchives")
+			->withPointerParameters("cache", cache)
+			->withOutputParameter("archives", archives);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t bundleCache_createArchive(bundle_cache_pt cache, long id, char * location, char *inputFile, bundle_archive_pt *archive) {
-	mock_c()->actualCall("bundleCache_createArchive");
+	mock_c()->actualCall("bundleCache_createArchive")
+			->withPointerParameters("cache", cache)
+			->withLongIntParameters("id", id)
+			->withStringParameters("location", location)
+			->withStringParameters("inputFile", inputFile)
+			->withOutputParameter("archive", archive);
 	return mock_c()->returnValue().value.intValue;
 }
 

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/mock/bundle_context_mock.c
----------------------------------------------------------------------
diff --git a/framework/private/mock/bundle_context_mock.c b/framework/private/mock/bundle_context_mock.c
index 9d3d79a..0e5ea6d 100644
--- a/framework/private/mock/bundle_context_mock.c
+++ b/framework/private/mock/bundle_context_mock.c
@@ -28,10 +28,10 @@
 #include "bundle_context.h"
 
 celix_status_t bundleContext_create(framework_pt framework, framework_logger_pt logger, bundle_pt bundle, bundle_context_pt *bundle_context) {
-        mock_c()->actualCall("bundleContext_create")
-                        ->withPointerParameters("framework", framework)
-                        ->withPointerParameters("logger", logger)
-                        ->withPointerParameters("bundle", bundle)
+	mock_c()->actualCall("bundleContext_create")
+			->withPointerParameters("framework", framework)
+			->withPointerParameters("logger", logger)
+			->withPointerParameters("bundle", bundle)
 			->withOutputParameter("bundle_context", (void **) bundle_context);
 	return mock_c()->returnValue().value.intValue;
 }
@@ -50,12 +50,12 @@ celix_status_t bundleContext_getFramework(bundle_context_pt context, framework_p
 	mock_c()->actualCall("bundleContext_getFramework")
 			->withPointerParameters("context", context)
 			->withOutputParameter("framework", (void **) framework);
-        return mock_c()->returnValue().value.intValue;
+	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t bundleContext_installBundle(bundle_context_pt context, char * location, bundle_pt *bundle) {
-        mock_c()->actualCall("bundleContext_installBundle")
-                        ->withPointerParameters("context", context)
+	mock_c()->actualCall("bundleContext_installBundle")
+			->withPointerParameters("context", context)
 			->withStringParameters("location", location)
 			->withOutputParameter("bundle", (void **) bundle);
 	return mock_c()->returnValue().value.intValue;
@@ -136,12 +136,17 @@ celix_status_t bundleContext_ungetService(bundle_context_pt context, service_ref
 
 
 celix_status_t bundleContext_getBundles(bundle_context_pt context, array_list_pt *bundles) {
-	mock_c()->actualCall("bundleContext_getBundles");
+	mock_c()->actualCall("bundleContext_getBundles")
+			->withPointerParameters("context", context)
+			->withOutputParameter("bundles", bundles);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t bundleContext_getBundleById(bundle_context_pt context, long id, bundle_pt *bundle) {
-	mock_c()->actualCall("bundleContext_getBundleById");
+	mock_c()->actualCall("bundleContext_getBundleById")
+			->withPointerParameters("context", context)
+			->withLongIntParameters("id", id)
+			->withOutputParameter("bundle", bundle);
 	return mock_c()->returnValue().value.intValue;
 }
 
@@ -174,6 +179,9 @@ celix_status_t bundleContext_removeBundleListener(bundle_context_pt context, bun
 
 
 celix_status_t bundleContext_getProperty(bundle_context_pt context, const char *name, char **value) {
-	mock_c()->actualCall("bundleContext_getProperty");
+	mock_c()->actualCall("bundleContext_getProperty")
+			->withPointerParameters("context", context)
+			->withStringParameters("name", name)
+			->withOutputParameter("value", value);
 	return mock_c()->returnValue().value.intValue;
 }

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/mock/bundle_mock.c
----------------------------------------------------------------------
diff --git a/framework/private/mock/bundle_mock.c b/framework/private/mock/bundle_mock.c
index 9802f51..a394d0f 100644
--- a/framework/private/mock/bundle_mock.c
+++ b/framework/private/mock/bundle_mock.c
@@ -28,7 +28,8 @@
 #include "bundle_private.h"
 
 celix_status_t bundle_create(bundle_pt * bundle) {
-	mock_c()->actualCall("bundle_create");
+	mock_c()->actualCall("bundle_create")
+			->withOutputParameter("bundle", bundle);
 	return mock_c()->returnValue().value.intValue;
 }
 
@@ -90,7 +91,9 @@ celix_status_t bundle_setActivator(bundle_pt bundle, activator_pt activator) {
 }
 
 celix_status_t bundle_getContext(bundle_pt bundle, bundle_context_pt *context) {
-	mock_c()->actualCall("bundle_getContext");
+	mock_c()->actualCall("bundle_getContext")
+			->withPointerParameters("bundle", bundle)
+			->withOutputParameter("context", context);
 	return mock_c()->returnValue().value.intValue;
 }
 
@@ -100,7 +103,10 @@ celix_status_t bundle_setContext(bundle_pt bundle, bundle_context_pt context) {
 }
 
 celix_status_t bundle_getEntry(bundle_pt bundle, char * name, char **entry) {
-	mock_c()->actualCall("bundle_getEntry");
+	mock_c()->actualCall("bundle_getEntry")
+			->withPointerParameters("bundle", bundle)
+			->withStringParameters("name", name)
+			->withOutputParameter("entry", entry);
 	return mock_c()->returnValue().value.intValue;
 }
 
@@ -186,27 +192,37 @@ int compareTo(service_reference_pt a, service_reference_pt b) {
 
 
 celix_status_t bundle_getState(bundle_pt bundle, bundle_state_e *state) {
-	mock_c()->actualCall("bundle_getState");
+	mock_c()->actualCall("bundle_getState")
+			->withPointerParameters("bundle", bundle)
+			->withOutputParameter("state", state);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t bundle_isLockable(bundle_pt bundle, bool *lockable) {
-	mock_c()->actualCall("bundle_isLockable");
+	mock_c()->actualCall("bundle_isLockable")
+			->withPointerParameters("bundle", bundle)
+			->withOutputParameter("lockable", lockable);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t bundle_getLockingThread(bundle_pt bundle, celix_thread_t *thread) {
-	mock_c()->actualCall("bundle_getLockingThread");
+	mock_c()->actualCall("bundle_getLockingThread")
+			->withPointerParameters("bundle", bundle)
+			->withOutputParameter("thread", thread);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t bundle_lock(bundle_pt bundle, bool *locked) {
-	mock_c()->actualCall("bundle_lock");
+	mock_c()->actualCall("bundle_lock")
+			->withPointerParameters("bundle", bundle)
+			->withOutputParameter("locked", locked);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t bundle_unlock(bundle_pt bundle, bool *unlocked) {
-	mock_c()->actualCall("bundle_unlock");
+	mock_c()->actualCall("bundle_unlock")
+			->withPointerParameters("bundle", bundle)
+			->withOutputParameter("unlocked", unlocked);
 	return mock_c()->returnValue().value.intValue;
 }
 
@@ -228,18 +244,24 @@ celix_status_t bundle_refresh(bundle_pt bundle) {
 }
 
 celix_status_t bundle_getBundleId(bundle_pt bundle, long *id) {
-	mock_c()->actualCall("bundle_getBundleId");
+	mock_c()->actualCall("bundle_getBundleId")
+			->withPointerParameters("bundle", bundle)
+			->withOutputParameter("id", id);
 	return mock_c()->returnValue().value.intValue;
 }
 
 
 celix_status_t bundle_getRegisteredServices(bundle_pt bundle, array_list_pt *list) {
-	mock_c()->actualCall("bundle_getRegisteredServices");
+	mock_c()->actualCall("bundle_getRegisteredServices")
+			->withPointerParameters("bundle", bundle)
+			->withOutputParameter("list", list);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t bundle_getServicesInUse(bundle_pt bundle, array_list_pt *list) {
-	mock_c()->actualCall("bundle_getServicesInUse");
+	mock_c()->actualCall("bundle_getServicesInUse")
+			->withPointerParameters("bundle", bundle)
+			->withOutputParameter("list", list);
 	return mock_c()->returnValue().value.intValue;
 }
 
@@ -249,7 +271,9 @@ celix_status_t bundle_setFramework(bundle_pt bundle, framework_pt framework) {
 }
 
 celix_status_t bundle_getFramework(bundle_pt bundle, framework_pt *framework) {
-	mock_c()->actualCall("bundle_getFramework");
+	mock_c()->actualCall("bundle_getFramework")
+			->withPointerParameters("bundle", bundle)
+			->withOutputParameter("framework", framework);
 	return mock_c()->returnValue().value.intValue;
 }
 

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/mock/bundle_revision_mock.c
----------------------------------------------------------------------
diff --git a/framework/private/mock/bundle_revision_mock.c b/framework/private/mock/bundle_revision_mock.c
index 847467c..0e24be5 100644
--- a/framework/private/mock/bundle_revision_mock.c
+++ b/framework/private/mock/bundle_revision_mock.c
@@ -28,7 +28,12 @@
 #include "bundle_revision.h"
 
 celix_status_t bundleRevision_create(char *root, char *location, long revisionNr, char *inputFile, bundle_revision_pt *bundle_revision) {
-	mock_c()->actualCall("bundleRevision_create");
+	mock_c()->actualCall("bundleRevision_create")
+			->withStringParameters("root", root)
+			->withStringParameters("location", location)
+			->withLongIntParameters("revisionNr", revisionNr)
+			->withStringParameters("inputFile", inputFile)
+			->withOutputParameter("bundle_revision", bundle_revision);
 	return mock_c()->returnValue().value.intValue;
 }
 
@@ -38,17 +43,23 @@ celix_status_t bundleRevision_destroy(bundle_revision_pt revision) {
 }
 
 celix_status_t bundleRevision_getNumber(bundle_revision_pt revision, long *revisionNr) {
-	mock_c()->actualCall("bundleRevision_getNumber");
+	mock_c()->actualCall("bundleRevision_getNumber")
+			->withPointerParameters("revision", revision)
+			->withOutputParameter("revisionNr", revisionNr);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t bundleRevision_getLocation(bundle_revision_pt revision, char **location) {
-	mock_c()->actualCall("bundleRevision_getLocation");
+	mock_c()->actualCall("bundleRevision_getLocation")
+			->withPointerParameters("revision", revision)
+			->withOutputParameter("location", location);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t bundleRevision_getRoot(bundle_revision_pt revision, char **root) {
-	mock_c()->actualCall("bundleRevision_getRoot");
+	mock_c()->actualCall("bundleRevision_getRoot")
+			->withPointerParameters("revision", revision)
+			->withOutputParameter("root", root);
 	return mock_c()->returnValue().value.intValue;
 }
 

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/mock/capability_mock.c
----------------------------------------------------------------------
diff --git a/framework/private/mock/capability_mock.c b/framework/private/mock/capability_mock.c
index 83bd39b..324e8d0 100644
--- a/framework/private/mock/capability_mock.c
+++ b/framework/private/mock/capability_mock.c
@@ -28,12 +28,17 @@
 #include "capability.h"
 
 celix_status_t capability_create(module_pt module, hash_map_pt directives, hash_map_pt attributes, capability_pt *capability) {
-	mock_c()->actualCall("capability_create");
+	mock_c()->actualCall("capability_create")
+			->withPointerParameters("module", module)
+			->withPointerParameters("directives", directives)
+			->withPointerParameters("attributes", attributes)
+			->withOutputParameter("capability", capability);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t capability_destroy(capability_pt capability) {
-	mock_c()->actualCall("capability_destroy");
+	mock_c()->actualCall("capability_destroy")
+			->withPointerParameters("capability", capability);
 	return mock_c()->returnValue().value.intValue;
 }
 

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/mock/filter_mock.c
----------------------------------------------------------------------
diff --git a/framework/private/mock/filter_mock.c b/framework/private/mock/filter_mock.c
index 8242b99..ba2b9c1 100644
--- a/framework/private/mock/filter_mock.c
+++ b/framework/private/mock/filter_mock.c
@@ -28,20 +28,27 @@
 #include "filter.h"
 
 filter_pt filter_create(char * filterString) {
-	mock_c()->actualCall("filter_create");
+	mock_c()->actualCall("filter_create")
+			->withStringParameters("filterString", filterString);
 	return mock_c()->returnValue().value.pointerValue;
 }
 
 void filter_destroy(filter_pt filter) {
-	mock_c()->actualCall("filter_destroy");
+	mock_c()->actualCall("filter_destroy")
+			->withPointerParameters("filter", filter);
 }
 
 celix_status_t filter_match(filter_pt filter, properties_pt properties, bool *result) {
-	mock_c()->actualCall("filter_match");
+	mock_c()->actualCall("filter_match")
+			->withPointerParameters("filter", filter)
+			->withPointerParameters("properties", properties)
+			->withOutputParameter("result", result);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t filter_getString(filter_pt filter, char **filterStr) {
-	mock_c()->actualCall("filter_getString");
+	mock_c()->actualCall("filter_getString")
+			->withPointerParameters("filter", filter)
+			->withOutputParameter("filterStr", filterStr);
 	return mock_c()->returnValue().value.intValue;
 }

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/mock/framework_mock.c
----------------------------------------------------------------------
diff --git a/framework/private/mock/framework_mock.c b/framework/private/mock/framework_mock.c
index c6fb2e9..cf941d4 100644
--- a/framework/private/mock/framework_mock.c
+++ b/framework/private/mock/framework_mock.c
@@ -273,7 +273,8 @@ service_registration_pt findRegistration(service_reference_pt reference) {
 
 
 service_reference_pt listToArray(array_list_pt list) {
-	mock_c()->actualCall("listToArray");
+	mock_c()->actualCall("listToArray")
+			->withPointerParameters("list", list);
 		return mock_c()->returnValue().value.pointerValue;
 }
 
@@ -296,7 +297,9 @@ array_list_pt framework_getBundles(framework_pt framework) {
 }
 
 bundle_pt framework_getBundle(framework_pt framework, char * location) {
-	mock_c()->actualCall("framework_getBundle");
+	mock_c()->actualCall("framework_getBundle")
+			->withPointerParameters("framework", framework)
+			->withStringParameters("location", location);
 		return mock_c()->returnValue().value.pointerValue;
 }
 
@@ -308,7 +311,9 @@ bundle_pt framework_getBundleById(framework_pt framework, long id) {
 }
 
 celix_status_t framework_getFrameworkBundle(framework_pt framework, bundle_pt *bundle) {
-	mock_c()->actualCall("framework_getFrameworkBundle");
+	mock_c()->actualCall("framework_getFrameworkBundle")
+			->withPointerParameters("framework", framework)
+			->withOutputParameter("bundle", bundle);
 	return mock_c()->returnValue().value.intValue;
 }
 

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/mock/manifest_mock.c
----------------------------------------------------------------------
diff --git a/framework/private/mock/manifest_mock.c b/framework/private/mock/manifest_mock.c
index a74601c..53e688c 100644
--- a/framework/private/mock/manifest_mock.c
+++ b/framework/private/mock/manifest_mock.c
@@ -55,7 +55,9 @@ properties_pt manifest_getMainAttributes(manifest_pt manifest) {
 }
 
 celix_status_t manifest_getEntries(manifest_pt manifest, hash_map_pt *map) {
-	mock_c()->actualCall("manifest_getEntries");
+	mock_c()->actualCall("manifest_getEntries")
+			->withPointerParameters("manifest", manifest)
+			->withOutputParameter("map", map);
 	return mock_c()->returnValue().value.intValue;
 }
 

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/mock/manifest_parser_mock.c
----------------------------------------------------------------------
diff --git a/framework/private/mock/manifest_parser_mock.c b/framework/private/mock/manifest_parser_mock.c
index dd55020..34b02fa 100644
--- a/framework/private/mock/manifest_parser_mock.c
+++ b/framework/private/mock/manifest_parser_mock.c
@@ -28,35 +28,43 @@
 #include "manifest_parser.h"
 
 celix_status_t manifestParser_create(module_pt owner, manifest_pt manifest, manifest_parser_pt *manifest_parser) {
-	mock_c()->actualCall("manifestParser_create");
+	mock_c()->actualCall("manifestParser_create")
+			->withPointerParameters("owner", owner)
+			->withPointerParameters("manifest", manifest)
+			->withOutputParameter("manifest_parser", manifest_parser);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t manifestParser_destroy(manifest_parser_pt manifest_parser) {
-    mock_c()->actualCall("manifestParser_destroy");
+    mock_c()->actualCall("manifestParser_destroy")
+    		->withPointerParameters("manifest_parser", manifest_parser);
     return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t manifestParser_getSymbolicName(manifest_parser_pt parser, char **symbolicName) {
 	mock_c()->actualCall("manifestParser_getSymbolicName")
+			->withPointerParameters("parser", parser)
 			->withOutputParameter("symbolicName", (void**) symbolicName);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t manifestParser_getBundleVersion(manifest_parser_pt parser, version_pt *version) {
 	mock_c()->actualCall("manifestParser_getBundleVersion")
+			->withPointerParameters("parser", parser)
 			->withOutputParameter("version", (void**) version);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t manifestParser_getCapabilities(manifest_parser_pt parser, linked_list_pt *capabilities) {
 	mock_c()->actualCall("manifestParser_getCapabilities")
+			->withPointerParameters("parser", parser)
 			->withOutputParameter("capabilities", (void**) capabilities);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t manifestParser_getRequirements(manifest_parser_pt parser, linked_list_pt *requirements) {
 	mock_c()->actualCall("manifestParser_getCurrentRequirements")
+			->withPointerParameters("parser", parser)
 			->withOutputParameter("requirements", (void**) requirements);
 	return mock_c()->returnValue().value.intValue;
 }

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/mock/requirement_mock.c
----------------------------------------------------------------------
diff --git a/framework/private/mock/requirement_mock.c b/framework/private/mock/requirement_mock.c
index 38de079..6282e7d 100644
--- a/framework/private/mock/requirement_mock.c
+++ b/framework/private/mock/requirement_mock.c
@@ -32,7 +32,6 @@ celix_status_t requirement_create(hash_map_pt directives, hash_map_pt attributes
 			->withPointerParameters("directives", directives)
 			->withPointerParameters("attributes", attributes)
 			->withOutputParameter("requirement", (void **) requirement);
-//			->_andPointerOutputParameters("requirement", (void **) requirement);
 	return mock_c()->returnValue().value.intValue;
 }
 

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/mock/service_reference_mock.c
----------------------------------------------------------------------
diff --git a/framework/private/mock/service_reference_mock.c b/framework/private/mock/service_reference_mock.c
index b60fb66..da4eede 100644
--- a/framework/private/mock/service_reference_mock.c
+++ b/framework/private/mock/service_reference_mock.c
@@ -63,7 +63,9 @@ celix_status_t serviceReference_getServiceRegistration(service_reference_pt refe
 }
 
 celix_status_t serviceReference_getBundle(service_reference_pt reference, bundle_pt *bundle) {
-	mock_c()->actualCall("serviceReference_getBundle");
+	mock_c()->actualCall("serviceReference_getBundle")
+		->withPointerParameters("reference", reference)
+		->withOutputParameter("bundle", bundle);
 	return mock_c()->returnValue().value.intValue;
 }
 
@@ -73,7 +75,9 @@ bool serviceReference_isAssignableTo(service_reference_pt reference, bundle_pt r
 }
 
 celix_status_t serviceReference_getUsingBundles(service_reference_pt reference, array_list_pt *bundles) {
-	mock_c()->actualCall("serviceReference_getUsingBundles");
+	mock_c()->actualCall("serviceReference_getUsingBundles")
+		->withPointerParameters("reference", reference)
+		->withOutputParameter("bundles", bundles);
 	return mock_c()->returnValue().value.intValue;
 }
 
@@ -91,7 +95,9 @@ unsigned int serviceReference_hashCode(void *referenceP) {
 }
 
 int serviceReference_equals2(void *reference1, void *reference2) {
-	mock_c()->actualCall("serviceReference_equals2");
+	mock_c()->actualCall("serviceReference_equals2")
+			->withPointerParameters("reference1", reference1)
+			->withPointerParameters("reference2", reference2);
 	return mock_c()->returnValue().value.intValue;
 }
 

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/mock/service_registry_mock.c
----------------------------------------------------------------------
diff --git a/framework/private/mock/service_registry_mock.c b/framework/private/mock/service_registry_mock.c
index c72e427..f5e726e 100644
--- a/framework/private/mock/service_registry_mock.c
+++ b/framework/private/mock/service_registry_mock.c
@@ -28,7 +28,10 @@
 #include "service_registry.h"
 
 celix_status_t serviceRegistry_create(framework_pt framework, serviceChanged_function_pt serviceChanged, service_registry_pt *registry) {
-	mock_c()->actualCall("serviceRegistry_create");
+	mock_c()->actualCall("serviceRegistry_create")
+			->withPointerParameters("framework", framework)
+			->withPointerParameters("serviceChanged", serviceChanged)
+			->withOutputParameter("registry", registry);
 	return mock_c()->returnValue().value.intValue;
 }
 
@@ -38,22 +41,40 @@ celix_status_t serviceRegistry_destroy(service_registry_pt registry) {
 }
 
 celix_status_t serviceRegistry_getRegisteredServices(service_registry_pt registry, bundle_pt bundle, array_list_pt *services) {
-	mock_c()->actualCall("serviceRegistry_getRegisteredServices");
+	mock_c()->actualCall("serviceRegistry_getRegisteredServices")
+			->withPointerParameters("registry", registry)
+			->withPointerParameters("bundle", bundle)
+			->withOutputParameter("services", services);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t serviceRegistry_getServicesInUse(service_registry_pt registry, bundle_pt bundle, array_list_pt *services) {
-	mock_c()->actualCall("serviceRegistry_getServicesInUse");
+	mock_c()->actualCall("serviceRegistry_getServicesInUse")
+			->withPointerParameters("registry", registry)
+			->withPointerParameters("bundle", bundle)
+			->withOutputParameter("services", services);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t serviceRegistry_registerService(service_registry_pt registry, bundle_pt bundle, char * serviceName, void * serviceObject, properties_pt dictionary, service_registration_pt *registration) {
-	mock_c()->actualCall("serviceRegistry_registerService");
+	mock_c()->actualCall("serviceRegistry_registerService")
+			->withPointerParameters("registry", registry)
+			->withPointerParameters("bundle", bundle)
+			->withStringParameters("serviceName", serviceName)
+			->withPointerParameters("serviceObject", serviceObject)
+			->withPointerParameters("dictionary", dictionary)
+			->withOutputParameter("registration", registration);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t serviceRegistry_registerServiceFactory(service_registry_pt registry, bundle_pt bundle, char * serviceName, service_factory_pt factory, properties_pt dictionary, service_registration_pt *registration) {
-	mock_c()->actualCall("serviceRegistry_registerServiceFactory");
+	mock_c()->actualCall("serviceRegistry_registerServiceFactory")
+		->withPointerParameters("registry", registry)
+		->withPointerParameters("bundle", bundle)
+		->withStringParameters("serviceName", serviceName)
+		->withPointerParameters("factory", factory)
+		->withPointerParameters("dictionary", dictionary)
+		->withOutputParameter("registration", registration);
 	return mock_c()->returnValue().value.intValue;
 }
 
@@ -91,12 +112,19 @@ celix_status_t serviceRegistry_ungetServiceReferences(service_registry_pt regist
 }
 
 celix_status_t serviceRegistry_getService(service_registry_pt registry, bundle_pt bundle, service_reference_pt reference, void **service) {
-	mock_c()->actualCall("serviceRegistry_getService");
+	mock_c()->actualCall("serviceRegistry_getService")
+		->withPointerParameters("registry", registry)
+		->withPointerParameters("bundle", bundle)
+		->withPointerParameters("reference", reference)
+		->withOutputParameter("service", service);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t serviceRegistry_ungetService(service_registry_pt registry, bundle_pt bundle, service_reference_pt reference, bool *result) {
-	mock_c()->actualCall("serviceRegistry_ungetService");
+	mock_c()->actualCall("serviceRegistry_ungetService")
+		->withPointerParameters("registry", registry)
+		->withPointerParameters("bundle", bundle)
+		->withOutputParameter("result", result);
 	return mock_c()->returnValue().value.intValue;
 }
 
@@ -117,7 +145,11 @@ service_registration_pt serviceRegistry_findRegistration(service_registry_pt reg
 }
 
 celix_status_t serviceRegistry_createServiceReference(service_registry_pt registry, bundle_pt bundle, service_registration_pt registration, service_reference_pt *reference) {
-	mock_c()->actualCall("serviceRegistry_createServiceReference");
+	mock_c()->actualCall("serviceRegistry_createServiceReference")
+		->withPointerParameters("registry", registry)
+		->withPointerParameters("bundle", bundle)
+		->withPointerParameters("registration", registration)
+		->withOutputParameter("reference", reference);
 	return mock_c()->returnValue().value.intValue;
 }
 
@@ -130,7 +162,10 @@ celix_status_t serviceRegistry_getServiceReferencesForRegistration(service_regis
 }
 
 celix_status_t serviceRegistry_getListenerHooks(service_registry_pt registry, bundle_pt bundle, array_list_pt *hooks) {
-	mock_c()->actualCall("serviceRegistry_getListenerHooks");
+	mock_c()->actualCall("serviceRegistry_getListenerHooks")
+		->withPointerParameters("registry", registry)
+		->withPointerParameters("bundle", bundle)
+		->withOutputParameter("hooks", hooks);
 	return mock_c()->returnValue().value.intValue;
 }
 

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/mock/service_tracker_customizer_mock.c
----------------------------------------------------------------------
diff --git a/framework/private/mock/service_tracker_customizer_mock.c b/framework/private/mock/service_tracker_customizer_mock.c
index 18ce3f9..9a9aae6 100644
--- a/framework/private/mock/service_tracker_customizer_mock.c
+++ b/framework/private/mock/service_tracker_customizer_mock.c
@@ -31,7 +31,13 @@ celix_status_t serviceTrackerCustomizer_create(void *handle,
 		adding_callback_pt addingFunction, added_callback_pt addedFunction,
 		modified_callback_pt modifiedFunction, removed_callback_pt removedFunction,
 		service_tracker_customizer_pt *customizer) {
-	mock_c()->actualCall("serviceTrackerCustomizer_create");
+	mock_c()->actualCall("serviceTrackerCustomizer_create")
+			->withPointerParameters("handle", handle)
+			->withPointerParameters("addingFunction", addingFunction)
+			->withPointerParameters("addedFunction", addedFunction)
+			->withPointerParameters("modifiedFunction", modifiedFunction)
+			->withPointerParameters("removedFunction", removedFunction)
+			->withOutputParameter("customizer", customizer);
 	return mock_c()->returnValue().value.intValue;
 }
 

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/resources-test/properties.txt
----------------------------------------------------------------------
diff --git a/framework/private/resources-test/properties.txt b/framework/private/resources-test/properties.txt
index bc5cd15..30f3c79 100644
--- a/framework/private/resources-test/properties.txt
+++ b/framework/private/resources-test/properties.txt
@@ -15,4 +15,6 @@
 # specific language governing permissions and limitations
 # under the License.
 a=b
-b=c
\ No newline at end of file
+b=c
+ // == \\ # 5 \0 \=
+ #line to check possible special characters
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/src/resolver.c
----------------------------------------------------------------------
diff --git a/framework/private/src/resolver.c b/framework/private/src/resolver.c
index 63b44a7..69d2557 100644
--- a/framework/private/src/resolver.c
+++ b/framework/private/src/resolver.c
@@ -459,9 +459,7 @@ linked_list_pt resolver_populateWireMap(hash_map_pt candidates, module_pt import
                                 linkedList_addElement(serviceWires, wire);
                             }
 
-                            wireMap = resolver_populateWireMap(candidates,
-                                    module,
-                                    wireMap);
+                            wireMap = resolver_populateWireMap(candidates,module,wireMap);
                         }
 
                         importerWires->wires = serviceWires;

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/test/bundle_cache_test.cpp
----------------------------------------------------------------------
diff --git a/framework/private/test/bundle_cache_test.cpp b/framework/private/test/bundle_cache_test.cpp
index 71174fe..93794ce 100644
--- a/framework/private/test/bundle_cache_test.cpp
+++ b/framework/private/test/bundle_cache_test.cpp
@@ -95,7 +95,9 @@ TEST(bundle_cache, deleteTree) {
 
 	mkdir(cacheDir, S_IRWXU);
 	mkdir(cacheDir2, S_IRWXU);
-	mktemp(cacheFile);
+	//mkstemp opens the file for safety, but bundlecache_delete needs to reopen the file
+	close(mkstemp(cacheFile));
+
 
 	LONGS_EQUAL(CELIX_SUCCESS, bundleCache_delete(cache));
 }

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/test/bundle_test.cpp
----------------------------------------------------------------------
diff --git a/framework/private/test/bundle_test.cpp b/framework/private/test/bundle_test.cpp
index 29fe5e8..bf17991 100644
--- a/framework/private/test/bundle_test.cpp
+++ b/framework/private/test/bundle_test.cpp
@@ -643,7 +643,10 @@ TEST(bundle, revise) {
 	char location[] = "location";
 	char inputFile[] = "inputFile";
 
-	mock().expectNCalls(2, "bundleArchive_revise");
+	mock().expectNCalls(2, "bundleArchive_revise")
+			.withParameter("archive", actual_archive)
+			.withParameter("location", location)
+			.withParameter("inputFile", inputFile);
 
 	mock().expectNCalls(2, "bundleArchive_getCurrentRevision")
 			.withParameter("archive", bundle->archive)
@@ -682,7 +685,10 @@ TEST(bundle, revise) {
 			.withOutputParameterReturning("symbolicName", &symbolic_name,sizeof(symbolic_name))
 			.andReturnValue(CELIX_ILLEGAL_ARGUMENT);
 
-	mock().expectOneCall("bundleArchive_rollbackRevise");
+	bool rolledBack = true;
+	mock().expectOneCall("bundleArchive_rollbackRevise")
+			.withParameter("archive", actual_archive)
+			.withOutputParameterReturning("rolledback", &rolledBack, sizeof(rolledBack));
 
 	mock().expectOneCall("framework_logCode")
 			.withParameter("code", CELIX_ILLEGAL_ARGUMENT);

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/test/capability_test.cpp
----------------------------------------------------------------------
diff --git a/framework/private/test/capability_test.cpp b/framework/private/test/capability_test.cpp
index 4d9f2eb..146f1f9 100644
--- a/framework/private/test/capability_test.cpp
+++ b/framework/private/test/capability_test.cpp
@@ -90,8 +90,14 @@ TEST(capability, create) {
 	capability_pt capability = NULL;
 	celix_status_t status = capability_create(module, directives, attributes, &capability);
 
-	mock().expectNCalls(2, "attribute_destroy");
-	mock().expectOneCall("version_destroy");
+	mock().expectOneCall("attribute_destroy")
+			.withParameter("attribute", serviceAttribute);
+	mock().expectOneCall("attribute_destroy")
+			.withParameter("attribute", versionAttribute);
+
+	mock().expectOneCall("version_destroy")
+			.withParameter("version", emptyVersion);
+
 	capability_destroy(capability);
 }
 

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/test/framework_test.cpp
----------------------------------------------------------------------
diff --git a/framework/private/test/framework_test.cpp b/framework/private/test/framework_test.cpp
index 81dabf5..586b400 100644
--- a/framework/private/test/framework_test.cpp
+++ b/framework/private/test/framework_test.cpp
@@ -55,7 +55,7 @@ TEST_GROUP(framework) {
 TEST(framework, create){
 	framework_pt framework = NULL;
 
-	mock().expectOneCall("bundle_create");
+	mock().expectOneCall("bundle_create").ignoreOtherParameters();
 
 	framework_create(&framework, properties);
 

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/test/module_test.cpp
----------------------------------------------------------------------
diff --git a/framework/private/test/module_test.cpp b/framework/private/test/module_test.cpp
index 7936d96..7b56f2c 100644
--- a/framework/private/test/module_test.cpp
+++ b/framework/private/test/module_test.cpp
@@ -34,6 +34,8 @@
 
 extern "C" {
 #include "module.h"
+
+#include "manifest_parser.h"
 }
 
 int main(int argc, char** argv) {
@@ -70,8 +72,9 @@ TEST_GROUP(module) {
 TEST(module, create){
 	module_pt module = NULL;
 	manifest_pt actual_manifest = (manifest_pt) 0x01;
-	bundle_pt actual_bundle = (bundle_pt) 0x02;
-	version_pt actual_version = (version_pt) 0x03;
+	manifest_parser_pt parser = (manifest_parser_pt) 0x02;
+	bundle_pt actual_bundle = (bundle_pt) 0x03;
+	version_pt actual_version = (version_pt) 0x04;
 	linked_list_pt actual_capabilities = NULL;
 	linked_list_pt actual_requirements= NULL;
 	char * actual_name = my_strdup("module");
@@ -79,21 +82,30 @@ TEST(module, create){
 
 	linkedList_create(&actual_capabilities);
 	linkedList_create(&actual_requirements);
-	mock().expectOneCall("manifestParser_create");
+	mock().expectOneCall("manifestParser_create")
+			.withParameter("manifest", actual_manifest)
+			.withOutputParameterReturning("manifest_parser", &parser, sizeof(parser))
+			.ignoreOtherParameters();
 	mock().expectOneCall("manifestParser_getSymbolicName")
-					.withOutputParameterReturning("symbolicName", &actual_name, sizeof(actual_name) );
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("symbolicName", &actual_name, sizeof(actual_name) );
 	mock().expectOneCall("manifestParser_getBundleVersion")
-					.withOutputParameterReturning("version", &actual_version, sizeof(version_pt) );
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("version", &actual_version, sizeof(actual_version) );
 	mock().expectOneCall("manifestParser_getCapabilities")
-					.withOutputParameterReturning("capabilities", &actual_capabilities, sizeof(linked_list_pt) );
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("capabilities", &actual_capabilities, sizeof(actual_capabilities) );
 	mock().expectOneCall("manifestParser_getCurrentRequirements")
-					.withOutputParameterReturning("requirements", &actual_requirements, sizeof(linked_list_pt) );
-	mock().expectOneCall("manifestParser_destroy");
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("requirements", &actual_requirements, sizeof(actual_requirements) );
+	mock().expectOneCall("manifestParser_destroy")
+			.withParameter("manifest_parser", parser);
 
 	module = module_create(actual_manifest, actual_id, actual_bundle);
 	CHECK(module != NULL);
 
-	mock().expectOneCall("version_destroy");
+	mock().expectOneCall("version_destroy")
+			.withParameter("version", actual_version);
 	module_destroy(module);
 
 	free(actual_id);
@@ -102,14 +114,21 @@ TEST(module, create){
 TEST(module, createFrameworkModule){
 	module_pt module = NULL;
 	bundle_pt actual_bundle = (bundle_pt) 0x01;
+	version_pt actual_version = (version_pt) 0x02;
 
-	mock().expectOneCall("version_createVersion");
+	mock().expectOneCall("version_createVersion")
+			.withParameter("major", 1)
+			.withParameter("minor", 0)
+			.withParameter("micro", 0)
+			.withParameter("qualifier", "")
+			.withOutputParameterReturning("version", &actual_version, sizeof(actual_version));
 
 	module = module_createFrameworkModule(actual_bundle);
 
 	CHECK(module != NULL);
 
-	mock().expectOneCall("version_destroy");
+	mock().expectOneCall("version_destroy")
+			.withParameter("version", actual_version);
 
 	module_destroy(module);
 }
@@ -117,8 +136,9 @@ TEST(module, createFrameworkModule){
 TEST(module, resolved){
 	module_pt module = NULL;
 	manifest_pt actual_manifest = (manifest_pt) 0x01;
-	bundle_pt actual_bundle = (bundle_pt) 0x02;
-	version_pt actual_version = (version_pt) 0x03;
+	manifest_parser_pt parser = (manifest_parser_pt) 0x02;
+	bundle_pt actual_bundle = (bundle_pt) 0x03;
+	version_pt actual_version = (version_pt) 0x04;
 	linked_list_pt actual_capabilities = NULL;
 	linked_list_pt actual_requirements= NULL;
 	char * actual_name = my_strdup("module");
@@ -126,23 +146,32 @@ TEST(module, resolved){
 
 	linkedList_create(&actual_capabilities);
 	linkedList_create(&actual_requirements);
-	mock().expectOneCall("manifestParser_create");
+	mock().expectOneCall("manifestParser_create")
+			.withParameter("manifest", actual_manifest)
+			.withOutputParameterReturning("manifest_parser", &parser, sizeof(parser))
+			.ignoreOtherParameters();
 	mock().expectOneCall("manifestParser_getSymbolicName")
-					.withOutputParameterReturning("symbolicName", &actual_name, sizeof(actual_name) );
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("symbolicName", &actual_name, sizeof(actual_name) );
 	mock().expectOneCall("manifestParser_getBundleVersion")
-					.withOutputParameterReturning("version", &actual_version, sizeof(version_pt) );
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("version", &actual_version, sizeof(actual_version) );
 	mock().expectOneCall("manifestParser_getCapabilities")
-					.withOutputParameterReturning("capabilities", &actual_capabilities, sizeof(linked_list_pt) );
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("capabilities", &actual_capabilities, sizeof(actual_capabilities) );
 	mock().expectOneCall("manifestParser_getCurrentRequirements")
-					.withOutputParameterReturning("requirements", &actual_requirements, sizeof(linked_list_pt) );
-	mock().expectOneCall("manifestParser_destroy");
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("requirements", &actual_requirements, sizeof(actual_requirements) );
+	mock().expectOneCall("manifestParser_destroy")
+			.withParameter("manifest_parser", parser);
 	module = module_create(actual_manifest, actual_id, actual_bundle);
 
 	CHECK_FALSE(module_isResolved(module));
 	module_setResolved(module);
 	CHECK(module_isResolved(module));
 
-	mock().expectOneCall("version_destroy");
+	mock().expectOneCall("version_destroy")
+			.withParameter("version", actual_version);
 	module_destroy(module);
 
 	free(actual_id);
@@ -150,12 +179,13 @@ TEST(module, resolved){
 
 TEST(module, wires){
 	manifest_pt manifest = (manifest_pt) 0x01;
-	bundle_pt bundle = (bundle_pt) 0x02;
-	version_pt version = (version_pt) 0x03;
-	wire_pt wire = (wire_pt) 0x04;
-	wire_pt wire_new = (wire_pt) 0x05;
-	capability_pt cap = (capability_pt) 0x06;
-	requirement_pt req = (requirement_pt) 0x07;
+	manifest_parser_pt parser = (manifest_parser_pt) 0x02;
+	bundle_pt bundle = (bundle_pt) 0x03;
+	version_pt version = (version_pt) 0x04;
+	wire_pt wire = (wire_pt) 0x05;
+	wire_pt wire_new = (wire_pt) 0x06;
+	capability_pt cap = (capability_pt) 0x07;
+	requirement_pt req = (requirement_pt) 0x08;
 	char * service_name = my_strdup("foobar");
 
 	//test var declarations
@@ -186,16 +216,24 @@ TEST(module, wires){
 	linkedList_addElement(requirements, req);
 	linkedList_addElement(wires, wire);
 
-	mock().expectOneCall("manifestParser_create");
+	mock().expectOneCall("manifestParser_create")
+			.withParameter("manifest", manifest)
+			.withOutputParameterReturning("manifest_parser", &parser, sizeof(parser))
+			.ignoreOtherParameters();
 	mock().expectOneCall("manifestParser_getSymbolicName")
-						.withOutputParameterReturning("symbolicName", &name, sizeof(name));
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("symbolicName", &name, sizeof(name) );
 	mock().expectOneCall("manifestParser_getBundleVersion")
-						.withOutputParameterReturning("version", &version, sizeof(version));
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("version", &version, sizeof(version) );
 	mock().expectOneCall("manifestParser_getCapabilities")
-						.withOutputParameterReturning("capabilities", &capabilities, sizeof(capabilities));
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("capabilities", &capabilities, sizeof(capabilities) );
 	mock().expectOneCall("manifestParser_getCurrentRequirements")
-						.withOutputParameterReturning("requirements", &requirements, sizeof(requirements));
-	mock().expectOneCall("manifestParser_destroy");
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("requirements", &requirements, sizeof(requirements) );
+	mock().expectOneCall("manifestParser_destroy")
+			.withParameter("manifest_parser", parser);
 	module = module_create(manifest, id, bundle);
 
 	//create module2
@@ -203,17 +241,26 @@ TEST(module, wires){
 	linkedList_create(&requirements2);
 	linkedList_create(&wires_new);
 	linkedList_addElement(wires_new, wire_new);
-	mock().expectOneCall("manifestParser_create");
+
+	mock().expectOneCall("manifestParser_create")
+			.withParameter("manifest", manifest)
+			.withOutputParameterReturning("manifest_parser", &parser, sizeof(parser))
+			.ignoreOtherParameters();
 	mock().expectOneCall("manifestParser_getSymbolicName")
-						.withOutputParameterReturning("symbolicName", &name2, sizeof(name2));
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("symbolicName", &name2, sizeof(name2) );
 	mock().expectOneCall("manifestParser_getBundleVersion")
-						.withOutputParameterReturning("version", &version, sizeof(version));
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("version", &version, sizeof(version) );
 	mock().expectOneCall("manifestParser_getCapabilities")
-						.withOutputParameterReturning("capabilities", &capabilities2, sizeof(capabilities2));
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("capabilities", &capabilities2, sizeof(capabilities2) );
 	mock().expectOneCall("manifestParser_getCurrentRequirements")
-						.withOutputParameterReturning("requirements", &requirements2, sizeof(requirements2));
-	mock().expectOneCall("manifestParser_destroy");
-	module2 = module_create(manifest, id, bundle);
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("requirements", &requirements2, sizeof(requirements2) );
+	mock().expectOneCall("manifestParser_destroy")
+			.withParameter("manifest_parser", parser);
+	module2 = module_create(manifest, id2, bundle);
 
 	//test empty wires handling
 	POINTERS_EQUAL(NULL, module_getWire(module, service_name));
@@ -248,7 +295,8 @@ TEST(module, wires){
 					.withParameter("wire", wire)
 					.withOutputParameterReturning("exporter", &module2, sizeof(module2));
 
-	mock().expectOneCall("wire_destroy");
+	mock().expectOneCall("wire_destroy")
+			.withParameter("wire", wire);
 
 	mock().expectOneCall("wire_getExporter")
 					.withParameter("wire", wire_new)
@@ -269,10 +317,17 @@ TEST(module, wires){
 	module_removeDependentRequirer(module, module2);
 
 	//clean up
-	mock().expectNCalls(2, "version_destroy");
-	mock().expectOneCall("wire_destroy");
-	mock().expectOneCall("capability_destroy");
-	mock().expectOneCall("requirement_destroy");
+	mock().expectNCalls(2, "version_destroy")
+			.withParameter("version", version);
+
+	mock().expectOneCall("wire_destroy")
+			.withParameter("wire", wire_new);
+
+	mock().expectOneCall("capability_destroy")
+			.withParameter("capability", cap);
+
+	mock().expectOneCall("requirement_destroy")
+			.withParameter("requirement", req);
 	module_destroy(module);
 	module_destroy(module2);
 
@@ -285,8 +340,9 @@ TEST(module, wires){
 TEST(module, get){
 	module_pt module = NULL;
 	manifest_pt actual_manifest = (manifest_pt) 0x01;
-	bundle_pt actual_bundle = (bundle_pt) 0x02;
-	version_pt actual_version = (version_pt) 0x03;
+	manifest_parser_pt parser = (manifest_parser_pt) 0x02;
+	bundle_pt actual_bundle = (bundle_pt) 0x03;
+	version_pt actual_version = (version_pt) 0x04;
 	linked_list_pt actual_capabilities = NULL;
 	linked_list_pt actual_requirements= NULL;
 	char * actual_name = my_strdup("module");
@@ -296,20 +352,24 @@ TEST(module, get){
 	linkedList_create(&actual_capabilities);
 	linkedList_create(&actual_requirements);
 
-	mock().expectOneCall("manifestParser_create");
+	mock().expectOneCall("manifestParser_create")
+			.withParameter("manifest", actual_manifest)
+			.withOutputParameterReturning("manifest_parser", &parser, sizeof(parser))
+			.ignoreOtherParameters();
 	mock().expectOneCall("manifestParser_getSymbolicName")
-					.withOutputParameterReturning("symbolicName", &actual_name, sizeof(actual_name) );
-
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("symbolicName", &actual_name, sizeof(actual_name) );
 	mock().expectOneCall("manifestParser_getBundleVersion")
-					.withOutputParameterReturning("version", &actual_version, sizeof(version_pt) );
-
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("version", &actual_version, sizeof(actual_version) );
 	mock().expectOneCall("manifestParser_getCapabilities")
-					.withOutputParameterReturning("capabilities", &actual_capabilities, sizeof(linked_list_pt) );
-
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("capabilities", &actual_capabilities, sizeof(actual_capabilities) );
 	mock().expectOneCall("manifestParser_getCurrentRequirements")
-					.withOutputParameterReturning("requirements", &actual_requirements, sizeof(linked_list_pt) );
-
-	mock().expectOneCall("manifestParser_destroy");
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("requirements", &actual_requirements, sizeof(actual_requirements) );
+	mock().expectOneCall("manifestParser_destroy")
+			.withParameter("manifest_parser", parser);
 
 
 	module = module_create(actual_manifest, actual_id, actual_bundle);
@@ -328,7 +388,8 @@ TEST(module, get){
 
 	LONGS_EQUAL(CELIX_ILLEGAL_ARGUMENT, module_getSymbolicName(NULL, &get));
 
-	mock().expectOneCall("version_destroy");
+	mock().expectOneCall("version_destroy")
+			.withParameter("version", actual_version);
 
 	module_destroy(module);
 

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/test/requirement_test.cpp
----------------------------------------------------------------------
diff --git a/framework/private/test/requirement_test.cpp b/framework/private/test/requirement_test.cpp
index b45f844..70114c5 100644
--- a/framework/private/test/requirement_test.cpp
+++ b/framework/private/test/requirement_test.cpp
@@ -88,8 +88,14 @@ TEST(requirement, create) {
 	requirement_pt requirement = NULL;
 	requirement_create(directives, attributes, &requirement);
 
-	mock().expectNCalls(2, "attribute_destroy");
-	mock().expectOneCall("versionRange_destroy");
+	mock().expectOneCall("attribute_destroy")
+			.withParameter("attribute", versionAttribute);
+
+	mock().expectOneCall("attribute_destroy")
+			.withParameter("attribute", serviceAttribute);
+
+	mock().expectOneCall("versionRange_destroy")
+			.withParameter("range", parsedRange);
 
 	requirement_destroy(requirement);
 }

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/test/resolver_test.cpp
----------------------------------------------------------------------
diff --git a/framework/private/test/resolver_test.cpp b/framework/private/test/resolver_test.cpp
index df8e608..753acf5 100644
--- a/framework/private/test/resolver_test.cpp
+++ b/framework/private/test/resolver_test.cpp
@@ -35,6 +35,10 @@
 extern "C" {
 #include "resolver.h"
 #include "celix_log.h"
+#include "manifest_parser.h"
+#include "requirement_private.h"
+#include "capability_private.h"
+#include "version_private.h"
 
 framework_logger_pt logger = (framework_logger_pt) 0x42;
 }
@@ -73,62 +77,101 @@ TEST_GROUP(resolver) {
 TEST(resolver, resolve){
 	module_pt module;
 	module_pt module2;
-	manifest_pt actual_manifest = (manifest_pt) 0x01;
-	bundle_pt actual_bundle = (bundle_pt) 0x02;
-	version_pt actual_version = (version_pt) 0x03;
-	linked_list_pt actual_capabilities = NULL;
-	linked_list_pt actual_requirements= NULL;
-	char * actual_name = my_strdup("module");
-	char * actual_id = my_strdup("42");
-	char * actual_service_name = my_strdup("test_service_foo");
-	char * actual_service_name2 = my_strdup("test_service_bar");
-	requirement_pt req = (requirement_pt) 0x04;
-	requirement_pt req2= (requirement_pt) 0x05;
-	capability_pt cap = (capability_pt) 0x06;
-	capability_pt cap2= (capability_pt) 0x07;
-	linked_list_pt get;
+	manifest_pt manifest = (manifest_pt) 0x01;
+	manifest_pt manifest2 = (manifest_pt) 0x02;
+	manifest_parser_pt parser = (manifest_parser_pt) 0x03;
+	manifest_parser_pt parser2 = (manifest_parser_pt) 0x04;
+	bundle_pt bundle = (bundle_pt) 0x05;
+	version_pt version = (version_pt) malloc(sizeof(*version));
+	linked_list_pt capabilities = NULL;
+	linked_list_pt requirements = NULL;
+	linked_list_pt empty_capabilities = NULL;
+	linked_list_pt empty_requirements = NULL;
+	char * name = my_strdup("module_one");
+	char * name2 = my_strdup("module_two");
+	char * id = my_strdup("42");
+	char * id2 = my_strdup("43");
+	char * service_name = my_strdup("test_service_foo");
+	char * service_name2 = my_strdup("test_service_bar");
+	requirement_pt req = (requirement_pt) 0x06;
+	requirement_pt req2= (requirement_pt) 0x07;
+	capability_pt cap = (capability_pt) 0x08;
+	capability_pt cap2= (capability_pt) 0x09;
+	wire_pt get_wire;
+	importer_wires_pt get_importer_wires;
+	linked_list_pt get_wire_map;
 
 	//creating module
-	linkedList_create(&actual_capabilities);
-	linkedList_create(&actual_requirements);
-
-	linkedList_addElement(actual_requirements, req);
-	linkedList_addElement(actual_requirements, req2);
-	linkedList_addElement(actual_capabilities, cap);
-	linkedList_addElement(actual_capabilities, cap2);
-
-
-	mock().expectNCalls(2, "manifestParser_create");
-	mock().expectNCalls(2,"manifestParser_getSymbolicName")
-					.withOutputParameterReturning("symbolicName", &actual_name, sizeof(actual_name) );
-	mock().expectNCalls(2, "manifestParser_getBundleVersion")
-					.withOutputParameterReturning("version", &actual_version, sizeof(version_pt) );
-	mock().expectNCalls(2, "manifestParser_getCapabilities")
-					.withOutputParameterReturning("capabilities", &actual_capabilities, sizeof(linked_list_pt) );
-	mock().expectNCalls(2, "manifestParser_getCurrentRequirements")
-					.withOutputParameterReturning("requirements", &actual_requirements, sizeof(linked_list_pt) );
-	mock().expectNCalls(2, "manifestParser_destroy");
-
-	module = module_create(actual_manifest, actual_id, actual_bundle);
-	module2 = module_create(actual_manifest, actual_id, actual_bundle);
+	linkedList_create(&capabilities);
+	linkedList_create(&empty_capabilities);
+	linkedList_create(&requirements);
+	linkedList_create(&empty_requirements);
+
+	linkedList_addElement(requirements, req);
+	linkedList_addElement(requirements, req2);
+	linkedList_addElement(capabilities, cap);
+	linkedList_addElement(capabilities, cap2);
+
+
+	mock().expectOneCall("manifestParser_create")
+			.withParameter("manifest", manifest)
+			.withOutputParameterReturning("manifest_parser", &parser, sizeof(parser))
+			.ignoreOtherParameters();
+	mock().expectOneCall("manifestParser_getSymbolicName")
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("symbolicName", &name, sizeof(name));
+	mock().expectOneCall("manifestParser_getBundleVersion")
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("version", &version, sizeof(version_pt));
+	mock().expectOneCall("manifestParser_getCapabilities")
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("capabilities", &empty_capabilities, sizeof(empty_capabilities));
+	mock().expectOneCall("manifestParser_getCurrentRequirements")
+			.withParameter("parser", parser)
+			.withOutputParameterReturning("requirements", &requirements, sizeof(requirements));
+	mock().expectOneCall("manifestParser_destroy")
+			.withParameter("manifest_parser", parser);
+
+	mock().expectOneCall("manifestParser_create")
+			.withParameter("manifest", manifest2)
+			.withOutputParameterReturning("manifest_parser", &parser2, sizeof(parser2))
+			.ignoreOtherParameters();
+	mock().expectOneCall("manifestParser_getSymbolicName")
+			.withParameter("parser", parser2)
+			.withOutputParameterReturning("symbolicName", &name2, sizeof(name2));
+	mock().expectOneCall("manifestParser_getBundleVersion")
+			.withParameter("parser", parser2)
+			.withOutputParameterReturning("version", &version, sizeof(version_pt));
+	mock().expectOneCall("manifestParser_getCapabilities")
+			.withParameter("parser", parser2)
+			.withOutputParameterReturning("capabilities", &capabilities, sizeof(linked_list_pt));
+	mock().expectOneCall("manifestParser_getCurrentRequirements")
+			.withParameter("parser", parser2)
+			.withOutputParameterReturning("requirements", &empty_requirements, sizeof(linked_list_pt));
+	mock().expectOneCall("manifestParser_destroy")
+			.withParameter("manifest_parser", parser2);
+
+
+	module = module_create(manifest, id, bundle);
+	module2 = module_create(manifest2, id2, bundle);
 
 	mock().expectOneCall("capability_getServiceName")
 			.withParameter("capability", cap)
-			.withOutputParameterReturning("serviceName", &actual_service_name, sizeof(actual_service_name));
+			.withOutputParameterReturning("serviceName", &service_name, sizeof(service_name));
 
 	mock().expectOneCall("capability_getServiceName")
 			.withParameter("capability", cap2)
-			.withOutputParameterReturning("serviceName", &actual_service_name2, sizeof(actual_service_name2));
+			.withOutputParameterReturning("serviceName", &service_name2, sizeof(service_name2));
 
 	resolver_addModule(module2);
 
-	mock().expectOneCall("requirement_getTargetName")
+	mock().expectOneCall( "requirement_getTargetName")
 			.withParameter("requirement", req)
-			.withOutputParameterReturning("targetName", &actual_service_name, sizeof(actual_service_name));
+			.withOutputParameterReturning("targetName", &service_name, sizeof(service_name));
 
 	mock().expectOneCall("requirement_getTargetName")
 			.withParameter("requirement", req2)
-			.withOutputParameterReturning("targetName", &actual_service_name2, sizeof(actual_service_name2));
+			.withOutputParameterReturning("targetName", &service_name2, sizeof(service_name2));
 
 	bool out = true;
 	mock().expectOneCall("requirement_isSatisfied")
@@ -141,28 +184,70 @@ TEST(resolver, resolve){
 			.withParameter("capability", cap2)
 			.withOutputParameterReturning("inRange", &out, sizeof(out));
 
-	mock().expectOneCall("capability_getModule")
+	mock().expectNCalls(2, "capability_getModule")
 			.withParameter("capability", cap)
-			.withOutputParameterReturning("module", &module, sizeof(module));
+			.withOutputParameterReturning("module", &module2, sizeof(module2));
+
+	mock().expectNCalls(2, "capability_getModule")
+			.withParameter("capability", cap2)
+			.withOutputParameterReturning("module", &module2, sizeof(module2));
+
+	get_wire_map = resolver_resolve(module);
+
+	get_importer_wires = (importer_wires_pt) linkedList_removeLast(get_wire_map);
+	if ( get_importer_wires->importer == module ) {
+		module_setWires(module, get_importer_wires->wires);
+		get_importer_wires = (importer_wires_pt) linkedList_removeLast(get_wire_map);
+		POINTERS_EQUAL(get_importer_wires->importer, module2);
+		module_setWires(module2, get_importer_wires->wires);
+	} else {
+		POINTERS_EQUAL(get_importer_wires->importer, module2);
+		module_setWires(module2, get_importer_wires->wires);
+		get_importer_wires = (importer_wires_pt) linkedList_removeLast(get_wire_map);
+		POINTERS_EQUAL(get_importer_wires->importer, module);
+		module_setWires(module, get_importer_wires->wires);
+	}
+
+	//test resolved module checking
+	module_setResolved(module);
+	POINTERS_EQUAL(NULL, resolver_resolve(module));
 
-	/*mock().expectOneCall("capability_getModule")
+	//CLEAN UP
+	mock().expectOneCall("capability_getServiceName")
 			.withParameter("capability", cap)
-			.withOutputParameterReturning("module", &module, sizeof(module));*/
+			.withOutputParameterReturning("serviceName", &service_name, sizeof(service_name));
 
-	get = resolver_resolve(module);
-	//CHECK(linkedList_contains(get, wire));
+	mock().expectOneCall("capability_getServiceName")
+			.withParameter("capability", cap2)
+			.withOutputParameterReturning("serviceName", &service_name2, sizeof(service_name2));
 
-	//test resolved module checking
+	resolver_removeModule(module2);
 
-	POINTERS_EQUAL(NULL, resolver_resolve(module));
+	mock().expectOneCall("requirement_destroy")
+			.withParameter("requirement", req);
+
+	mock().expectOneCall("requirement_destroy")
+			.withParameter("requirement", req2);
+
+	mock().expectOneCall("capability_destroy")
+			.withParameter("capability", cap);
+
+	mock().expectOneCall("capability_destroy")
+			.withParameter("capability", cap2);
+
+	mock().expectNCalls(2, "version_destroy")
+			.withParameter("version", version);
 
-	mock().expectOneCall("version_destroy");
 	module_destroy(module);
 	module_destroy(module2);
 
+	linkedList_destroy(get_wire_map);
 
-	free(actual_id);
-	free(actual_name);
+	free(id);
+	free(id2);
+	free(service_name);
+	free(service_name2);
+	free(version);
 }
 /*
 TEST(resolver, moduleResolved){

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/test/service_reference_test.cpp
----------------------------------------------------------------------
diff --git a/framework/private/test/service_reference_test.cpp b/framework/private/test/service_reference_test.cpp
index 1c383ec..5d8213a 100644
--- a/framework/private/test/service_reference_test.cpp
+++ b/framework/private/test/service_reference_test.cpp
@@ -34,7 +34,6 @@
 extern "C" {
 #include "service_reference_private.h"
 #include "celix_log.h"
-#include "utils.h"
 
 framework_logger_pt logger;
 }

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/test/service_registration_test.cpp
----------------------------------------------------------------------
diff --git a/framework/private/test/service_registration_test.cpp b/framework/private/test/service_registration_test.cpp
index cec62ef..a24c804 100644
--- a/framework/private/test/service_registration_test.cpp
+++ b/framework/private/test/service_registration_test.cpp
@@ -35,7 +35,7 @@ extern "C" {
 #include "service_registration_private.h"
 #include "celix_log.h"
 
-framework_logger_pt logger;
+framework_logger_pt logger = (framework_logger_pt) 0x42;
 }
 
 int main(int argc, char** argv) {
@@ -44,8 +44,6 @@ int main(int argc, char** argv) {
 
 TEST_GROUP(service_registration) {
 	void setup(void) {
-		logger = (framework_logger_pt) malloc(sizeof(*logger));
-        logger->logFunction = frameworkLogger_log;
 	}
 
 	void teardown() {

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/test/service_registry_test.cpp
----------------------------------------------------------------------
diff --git a/framework/private/test/service_registry_test.cpp b/framework/private/test/service_registry_test.cpp
index 0175f45..507bda2 100644
--- a/framework/private/test/service_registry_test.cpp
+++ b/framework/private/test/service_registry_test.cpp
@@ -273,6 +273,10 @@ TEST(service_registry, unregisterService) {
 		.withParameter("registration", registration)
 		.andReturnValue(CELIX_SUCCESS);
 
+	mock()
+		.expectOneCall("serviceRegistration_destroy")
+		.withParameter("registration", registration);
+
 	serviceRegistry_unregisterService(registry, bundle, registration);
 
 	free(registry);
@@ -310,7 +314,6 @@ TEST(service_registry, unregisterServices) {
 }
 
 TEST(service_registry, getServiceReferencesForRegistration){
-#warning implement this
 	service_registry_pt registry = (service_registry_pt) malloc(sizeof(*registry));
 	registry->inUseMap = hashMap_create(NULL, NULL, NULL, NULL);
 	celixThreadMutexAttr_create(&registry->mutexAttr);

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/test/service_tracker_test.cpp
----------------------------------------------------------------------
diff --git a/framework/private/test/service_tracker_test.cpp b/framework/private/test/service_tracker_test.cpp
index 06c268e..de9e3c0 100644
--- a/framework/private/test/service_tracker_test.cpp
+++ b/framework/private/test/service_tracker_test.cpp
@@ -612,12 +612,6 @@ TEST(service_tracker, serviceChangedModified) {
 		.ignoreOtherParameters()
 		.andReturnValue(CELIX_SUCCESS);
 
-	mock()
-			.expectOneCall("bundleContext_getService")
-			.withParameter("context", ctx)
-			.withParameter("reference", ref)
-			.withOutputParameterReturning("service_instance", &entry->service, sizeof(entry->service));
-
 	serviceTracker_serviceChanged(listener, event);
 
 	free(arrayList_get(tracked, 0));
@@ -830,18 +824,14 @@ TEST(service_tracker, serviceChangedModifiedCustomizer) {
 		.ignoreOtherParameters()
 		.andReturnValue(CELIX_SUCCESS);
 	void * handle = (void*) 0x60;
+
+/*	this branch is not covered here, unlike earlier faulty tests
 	mock()
-		.expectNCalls(2, "serviceTrackerCustomizer_getHandle")
+		.expectOneCall("serviceTrackerCustomizer_getHandle")
 		.withParameter("customizer", customizer)
 		.withOutputParameterReturning("handle", &handle, sizeof(handle))
 		.andReturnValue(CELIX_SUCCESS);
-	void *function = (void *) serviceDependency_modifiedService;
-/*	mock()
-		.expectOneCall("serviceTrackerCustomizer_getModifiedFunction")
-		.withParameter("customizer", customizer)
-		.withOutputParameterReturning("function", &function, sizeof(function))
-		.andReturnValue(CELIX_SUCCESS);
-*/
+
 	mock()
 		.expectOneCall("serviceTrackerCustomizer_getAddingFunction")
 		.withParameter("customizer", customizer)
@@ -853,13 +843,25 @@ TEST(service_tracker, serviceChangedModifiedCustomizer) {
 		.withParameter("customizer", customizer)
 		.withOutputParameterReturning("function", &added_func, sizeof(added_func));
 
-
 	mock()
 		.expectOneCall("bundleContext_getService")
 		.withParameter("context", ctx)
 		.withParameter("reference", ref)
 		.withOutputParameterReturning("service_instance", &entry->service, sizeof(entry->service));
+*/
 
+	mock()
+			.expectOneCall("serviceTrackerCustomizer_getHandle")
+			.withParameter("customizer", customizer)
+			.withOutputParameterReturning("handle", &handle, sizeof(handle))
+			.andReturnValue(CELIX_SUCCESS);
+
+	void *function = (void *) serviceDependency_modifiedService;
+	mock()
+		.expectOneCall("serviceTrackerCustomizer_getModifiedFunction")
+		.withParameter("customizer", customizer)
+		.withOutputParameterReturning("function", &function, sizeof(function))
+		.andReturnValue(CELIX_SUCCESS);
 
 	serviceTracker_serviceChanged(listener, event);
 

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/private/test/version_range_test.cpp
----------------------------------------------------------------------
diff --git a/framework/private/test/version_range_test.cpp b/framework/private/test/version_range_test.cpp
index 95bf1b1..d16c38b 100644
--- a/framework/private/test/version_range_test.cpp
+++ b/framework/private/test/version_range_test.cpp
@@ -87,7 +87,8 @@ TEST(version_range, create) {
 	POINTERS_EQUAL(version, range->low);
 	POINTERS_EQUAL(version, range->high);
 
-	mock().expectNCalls(2, "version_destroy");
+	mock().expectNCalls(2, "version_destroy")
+			.withParameter("version", version);
 
 	versionRange_destroy(range);
 	free(version);
@@ -112,7 +113,8 @@ TEST(version_range, createInfinite) {
 	POINTERS_EQUAL(version, range->low);
 	POINTERS_EQUAL(NULL, range->high);
 
-	mock().expectOneCall("version_destroy");
+	mock().expectOneCall("version_destroy")
+			.withParameter("version", version);
 
 	versionRange_destroy(range);
 	free(version);
@@ -153,31 +155,49 @@ TEST(version_range, isInRange) {
 	versionRange_createVersionRange(low, true, high, true, &range);
 	LONGS_EQUAL(CELIX_SUCCESS, versionRange_isInRange(range, version, &result));
 	LONGS_EQUAL(true, result);
-	mock().expectNCalls(2, "version_destroy");
+
+	mock().expectOneCall("version_destroy")
+			.withParameter("version", low);
+	mock().expectOneCall("version_destroy")
+			.withParameter("version", high);
 	versionRange_destroy(range);
 
 	versionRange_createVersionRange(low, true, NULL, true, &range);
 	LONGS_EQUAL(CELIX_SUCCESS, versionRange_isInRange(range, version, &result));
 	LONGS_EQUAL(true, result);
-	mock().expectOneCall("version_destroy");
+
+	mock().expectOneCall("version_destroy")
+			.withParameter("version", low);
 	versionRange_destroy(range);
 
 	versionRange_createVersionRange(low, false, high, true, &range);
 	LONGS_EQUAL(CELIX_SUCCESS, versionRange_isInRange(range, version, &result));
 	LONGS_EQUAL(true, result);
-	mock().expectNCalls(2, "version_destroy");
+
+	mock().expectOneCall("version_destroy")
+			.withParameter("version", low);
+	mock().expectOneCall("version_destroy")
+			.withParameter("version", high);
 	versionRange_destroy(range);
 
 	versionRange_createVersionRange(low, true, high, false, &range);
 	LONGS_EQUAL(CELIX_SUCCESS, versionRange_isInRange(range, version, &result));
 	LONGS_EQUAL(true, result);
-	mock().expectNCalls(2, "version_destroy");
+
+	mock().expectOneCall("version_destroy")
+			.withParameter("version", low);
+	mock().expectOneCall("version_destroy")
+			.withParameter("version", high);
 	versionRange_destroy(range);
 
 	versionRange_createVersionRange(low, false, high, false, &range);
 	LONGS_EQUAL(CELIX_SUCCESS, versionRange_isInRange(range, version, &result));
 	LONGS_EQUAL(true, result);
-	mock().expectNCalls(2, "version_destroy");
+
+	mock().expectOneCall("version_destroy")
+			.withParameter("version", low);
+	mock().expectOneCall("version_destroy")
+			.withParameter("version", high);
 	versionRange_destroy(range);
 
 	free(version);
@@ -199,7 +219,11 @@ TEST(version_range, parse) {
 	high->minor = 8;
 	high->micro = 9;
 
-	mock().expectNCalls(3, "version_destroy");
+	mock().expectOneCall("version_destroy")
+			.withParameter("version", high);
+
+	mock().expectNCalls(2, "version_destroy")
+			.withParameter("version", low);
 
 	mock().expectOneCall("version_createVersionFromString")
 		   .withParameter("versionStr", "1.2.3")

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/framework/tst/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/framework/tst/CMakeLists.txt b/framework/tst/CMakeLists.txt
index 98cfb34..672fd99 100644
--- a/framework/tst/CMakeLists.txt
+++ b/framework/tst/CMakeLists.txt
@@ -38,5 +38,5 @@ configure_file(framework1.properties.in framework1.properties @ONLY)
 configure_file(framework2.properties.in framework2.properties @ONLY)
 
 add_test(NAME run_test_framework COMMAND test_framework)
-SETUP_TARGET_FOR_COVERAGE(test_framework_cov test_framework ${CMAKE_BINARY_DIR}/coverage/framework/framework)
+SETUP_TARGET_FOR_COVERAGE(test_framework_cov test_framework ${CMAKE_BINARY_DIR}/coverage/test_framework/test_framework)
 

http://git-wip-us.apache.org/repos/asf/celix/blob/1b7b3e8b/utils/private/test/celix_threads_test.cpp
----------------------------------------------------------------------
diff --git a/utils/private/test/celix_threads_test.cpp b/utils/private/test/celix_threads_test.cpp
index 6d62bad..29e4475 100644
--- a/utils/private/test/celix_threads_test.cpp
+++ b/utils/private/test/celix_threads_test.cpp
@@ -287,7 +287,7 @@ static void * thread_test_func_exit(void *) {
 	int *pi = (int*) calloc(1, sizeof(int));
 	*pi = 666;
 
-	return pi;
+	celixThread_exit(pi);
 }
 
 static void * thread_test_func_detach(void *) {


Mime
View raw message