summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorContinuous Integration <ci@tangent.org>2013-04-20 02:58:06 -0700
committerContinuous Integration <ci@tangent.org>2013-04-20 02:58:06 -0700
commit979aeab103387877cb5687ec79d2c7ed26041ca7 (patch)
treea7f4939ec82a4770f9352036dfbe7a7edca1f3e3 /tests
parentc638593177a29eace04b193715e7f70eefbfdc96 (diff)
parent4ec400319b67d93c1f6a103f58196018f52dafd2 (diff)
downloadlibmemcached-979aeab103387877cb5687ec79d2c7ed26041ca7.tar.gz
Merge lp:~brianaker/libmemcached/merge-1.0-april-2013 Build: jenkins-Libmemcached-270
Diffstat (limited to 'tests')
-rw-r--r--tests/keys.hpp6
-rw-r--r--tests/libmemcached-1.0/mem_functions.cc2
-rw-r--r--tests/libmemcached-1.0/sasl.cc4
3 files changed, 8 insertions, 4 deletions
diff --git a/tests/keys.hpp b/tests/keys.hpp
index 11b7c061..1034a672 100644
--- a/tests/keys.hpp
+++ b/tests/keys.hpp
@@ -2,7 +2,7 @@
*
* Libmemcached library
*
- * Copyright (C) 2012 Data Differential, http://datadifferential.com/
+ * Copyright (C) 2012-2013 Data Differential, http://datadifferential.com/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -62,18 +62,18 @@ public:
key_buffer.resize(padding +1);
memset(&key_buffer[0], 'x', padding);
+#if defined(HAVE_UUID_UUID_H) && HAVE_UUID_UUID_H
if (HAVE_UUID_UUID_H)
{
-#if defined(HAVE_UUID_UUID_H) && HAVE_UUID_UUID_H
uuid_t out;
uuid_generate(out);
uuid_unparse(out, &key_buffer[0]);
_keys[x]= strdup(&key_buffer[0]);
(_keys[x])[UUID_STRING_MAXLENGTH]= 'x';
-#endif
}
else // We just use a number and pad the string if UUID is not available
+#endif
{
char int_buffer[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH +1];
int key_length= snprintf(int_buffer, sizeof(int_buffer), "%u", uint32_t(x));
diff --git a/tests/libmemcached-1.0/mem_functions.cc b/tests/libmemcached-1.0/mem_functions.cc
index de82e5d9..03b85024 100644
--- a/tests/libmemcached-1.0/mem_functions.cc
+++ b/tests/libmemcached-1.0/mem_functions.cc
@@ -2839,7 +2839,7 @@ test_return_t ketama_TEST(memcached_st *)
test_compare(memcached_behavior_set(&memc, MEMCACHED_BEHAVIOR_KETAMA_HASH, MEMCACHED_HASH_MD5), MEMCACHED_SUCCESS);
- test_compare(memcached_behavior_get(&memc, MEMCACHED_BEHAVIOR_KETAMA_HASH), MEMCACHED_HASH_MD5);
+ test_compare(memcached_hash_t(memcached_behavior_get(&memc, MEMCACHED_BEHAVIOR_KETAMA_HASH)), MEMCACHED_HASH_MD5);
test_compare(memcached_behavior_set_distribution(&memc, MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY), MEMCACHED_SUCCESS);
diff --git a/tests/libmemcached-1.0/sasl.cc b/tests/libmemcached-1.0/sasl.cc
index ce148cfc..06f9e3db 100644
--- a/tests/libmemcached-1.0/sasl.cc
+++ b/tests/libmemcached-1.0/sasl.cc
@@ -64,6 +64,7 @@ static test_return_t pre_sasl(memcached_st *)
*/
static test_return_t sasl_auth_test(memcached_st *memc)
{
+#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
if (LIBMEMCACHED_WITH_SASL_SUPPORT)
{
test_compare(MEMCACHED_SUCCESS, memcached_set(memc, "foo", 3, "bar", 3, (time_t)0, (uint32_t)0));
@@ -80,6 +81,9 @@ static test_return_t sasl_auth_test(memcached_st *memc)
memcached_quit(memc);
return TEST_SUCCESS;
}
+#else
+ (void)memc;
+#endif
return TEST_SKIPPED;
}