MCPcopy Create free account
hub / github.com/ElementsProject/elements / Verify

Method Verify

src/leveldb/db/fault_injection_test.cc:418–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

416 }
417
418 Status Verify(int start_idx, int num_vals,
419 ExpectedVerifResult expected) const {
420 std::string val;
421 std::string value_space;
422 Status s;
423 for (int i = start_idx; i < start_idx + num_vals && s.ok(); i++) {
424 Value(i, &value_space);
425 s = ReadValue(i, &val);
426 if (expected == VAL_EXPECT_NO_ERROR) {
427 if (s.ok()) {
428 ASSERT_EQ(value_space, val);
429 }
430 } else if (s.ok()) {
431 fprintf(stderr, "Expected an error at %d, but was OK\n", i);
432 s = Status::IOError(dbname_, "Expected value error:");
433 } else {
434 s = Status::OK(); // An expected error
435 }
436 }
437 return s;
438 }
439
440 // Return the ith key
441 Slice Key(int i, std::string* storage) const {

Callers

nothing calls this directly

Calls 3

ValueFunction · 0.85
IOErrorFunction · 0.85
OKFunction · 0.85

Tested by

no test coverage detected