]> git.notmuchmail.org Git - notmuch/blobdiff - test/symbol-test.cc
test: Test upgrade to ghost messages feature
[notmuch] / test / symbol-test.cc
index 1de06eae41032f0c0d5b05c840f3942cfff043da..3e96c034e13e94412285bcde6dd2d74e870993d2 100644 (file)
@@ -1,17 +1,18 @@
 #include <stdio.h>
 #include <xapian.h>
 #include <notmuch.h>
-main (int argc, char **argv){
 
-    notmuch_database_t *notmuch
-      = 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;
 }