19 lines
511 B
C++
19 lines
511 B
C++
#include <string.h>
|
|
#include "doctest.h"
|
|
#include "taskchampion.h"
|
|
|
|
TEST_CASE("creating an in-memory Replica does not crash") {
|
|
Replica *rep = tc_replica_new(NULL);
|
|
CHECK(tc_replica_error(rep) == NULL);
|
|
tc_replica_free(rep);
|
|
}
|
|
|
|
TEST_CASE("undo on an empty in-memory Replica does nothing") {
|
|
Replica *rep = tc_replica_new(NULL);
|
|
CHECK(tc_replica_error(rep) == NULL);
|
|
int rv = tc_replica_undo(rep);
|
|
CHECK(rv == 0);
|
|
CHECK(tc_replica_error(rep) == NULL);
|
|
tc_replica_free(rep);
|
|
}
|