Ticket #399: valuesaftercommit.cc

File valuesaftercommit.cc, 432 bytes (added by Rich Lane, 15 years ago)

values-after-commit testcase

Line 
1DEFINE_TESTCASE(valuesaftercommit1, writable) {
2 Xapian::WritableDatabase db = get_writable_database();
3 Xapian::Document doc;
4 doc.add_value(0, "value");
5 db.replace_document(2, doc);
6 db.commit();
7 db.replace_document(1, doc);
8 db.replace_document(3, doc);
9 TEST_EQUAL(db.get_document(3).get_value(0), "value");
10 db.commit();
11 TEST_EQUAL(db.get_document(3).get_value(0), "value");
12 return true;
13}