Fix merge_test failure due to incorrect assert behavior in the release mode.

main
Yueh-Hsuan Chiang 11 years ago
parent 82b37a18bd
commit 327102efa5
  1. 8
      db/merge_test.cc

@ -203,12 +203,16 @@ class Counters {
uint64_t assert_get(const string& key) { uint64_t assert_get(const string& key) {
uint64_t value = default_; uint64_t value = default_;
assert(get(key, &value)); int result = get(key, &value);
assert(result);
if (result == 0) exit(1); // Disable unused variable warning.
return value; return value;
} }
void assert_add(const string& key, uint64_t value) { void assert_add(const string& key, uint64_t value) {
assert(add(key, value)); int result = add(key, value);
assert(result);
if (result == 0) exit(1); // Disable unused variable warning.
} }
}; };

Loading…
Cancel
Save