summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a280d2a)
Instead of printing the same static string for each test, can replace
the assert with something simpler (or at least easier to integrate
into the test suite).
#include <stdio.h>
#include <notmuch.h>
#include <notmuch-test.h>
#include <stdio.h>
#include <notmuch.h>
#include <notmuch-test.h>
int main (int argc, char** argv)
{
notmuch_database_t *db;
int main (int argc, char** argv)
{
notmuch_database_t *db;
exit (1);
}
EXPECT0(notmuch_database_find_message (db, id, &message));
exit (1);
}
EXPECT0(notmuch_database_find_message (db, id, &message));
- assert(message != NULL);
EXPECT0(notmuch_database_close (db));
EOF
EXPECT0(notmuch_database_close (db));
EOF
{
const char *id2;
id2=notmuch_message_get_message_id (message);
{
const char *id2;
id2=notmuch_message_get_message_id (message);
- printf("%s\n%d\n", id, id2==NULL);
+ printf("%d\n%d\n", message != NULL, id2==NULL);
}
EOF
cat <<EOF > EXPECTED
== stdout ==
}
EOF
cat <<EOF > EXPECTED
== stdout ==
-1258471718-6781-1-git-send-email-dottedmag@dottedmag.net
{
const char *id2;
id2=notmuch_message_get_thread_id (message);
{
const char *id2;
id2=notmuch_message_get_thread_id (message);
- printf("%s\n%d\n", id, id2==NULL);
+ printf("%d\n%d\n", message != NULL, id2==NULL);
}
EOF
cat <<EOF > EXPECTED
== stdout ==
}
EOF
cat <<EOF > EXPECTED
== stdout ==
-1258471718-6781-1-git-send-email-dottedmag@dottedmag.net