ICC fix
[awesomized/libmemcached] / tests / hashkit_functions.c
index 1302011e76f48f14ad49f362bcf51c42f85bad09..2990b2331e1739e124414b291920c42ff54e6687 100644 (file)
@@ -249,6 +249,9 @@ static test_return_t hsieh_run (hashkit_st *hashk __attribute__((unused)))
 
 static test_return_t murmur_run (hashkit_st *hashk __attribute__((unused)))
 {
+#ifdef __sparc
+  return TEST_SKIPPED;
+#else
   uint32_t x;
   const char **ptr;
 
@@ -261,6 +264,7 @@ static test_return_t murmur_run (hashkit_st *hashk __attribute__((unused)))
   }
 
   return TEST_SUCCESS;
+#endif
 }
 
 static test_return_t jenkins_run (hashkit_st *hashk __attribute__((unused)))
@@ -325,21 +329,41 @@ collection_st collection[] ={
 };
 
 /* Prototypes for functions we will pass to test framework */
-void *world_create(void);
+void *world_create(test_return_t *error);
 test_return_t world_destroy(hashkit_st *hashk);
 
-void *world_create(void)
+void *world_create(test_return_t *error)
 {
   hashkit_st *hashk_ptr;
 
   hashk_ptr= hashkit_create(&global_hashk);
 
-  assert(hashk_ptr == &global_hashk);
+  if (hashk_ptr != &global_hashk)
+  {
+    *error= TEST_FAILURE;
+    return NULL;
+  }
 
   // First we test if hashk is even valid
-  assert(hashkit_is_initialized(hashk_ptr) == true);
-  assert(hashkit_is_allocated(hashk_ptr) == false);
-  assert(hashk_ptr->continuum == NULL);
+  if (hashkit_is_initialized(hashk_ptr) == false)
+  {
+    *error= TEST_FAILURE;
+    return NULL;
+  }
+
+  if (hashkit_is_allocated(hashk_ptr) == true)
+  {
+    *error= TEST_FAILURE;
+    return NULL;
+  }
+
+  if (hashk_ptr->continuum != NULL)
+  {
+    *error= TEST_FAILURE;
+    return NULL;
+  }
+
+  *error= TEST_SUCCESS;
 
   return hashk_ptr;
 }