]> git.notmuchmail.org Git - notmuch/blobdiff - test/symbol-test.cc
test: Test upgrade to ghost messages feature
[notmuch] / test / symbol-test.cc
index ec250b2de34aa3aa12663430ed87b194ca1f32f6..3e96c034e13e94412285bcde6dd2d74e870993d2 100644 (file)
@@ -1,16 +1,18 @@
 #include <stdio.h>
 #include <xapian.h>
 #include <notmuch.h>
-int main (){
 
-  (void)notmuch_database_open ("fakedb",
-                                    NOTMUCH_DATABASE_MODE_READ_ONLY);
 
-  try{
-    (void)new Xapian::WritableDatabase ("./nonexistant",                                       Xapian::DB_OPEN);
+int main() {
+  notmuch_database_t *notmuch;
+  notmuch_database_open("fakedb", NOTMUCH_DATABASE_MODE_READ_ONLY, &notmuch);
+
+  try {
+    (void) new Xapian::WritableDatabase("./nonexistant", Xapian::DB_OPEN);
   } catch (const Xapian::Error &error) {
-    printf("caught %s\n",error.get_msg().c_str());
+    printf("caught %s\n", error.get_msg().c_str());
     return 0;
   }
+
   return 1;
 }