1 /* Copyright (C) 2013-2019 Roland Lutz
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2 of the License, or
6 (at your option) any later version.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software Foundation,
15 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
22 xorn_revision_t rev0
, rev1
, rev2
, rev3
;
23 xorn_object_t ob0
, ob1a
, ob1b
;
25 setup(&rev0
, &rev1
, &rev2
, &rev3
, &ob0
, &ob1a
, &ob1b
);
27 assert(xorn_object_exists_in_revision(rev0
, ob0
) == false);
28 assert(xorn_object_exists_in_revision(rev0
, ob1a
) == false);
29 assert(xorn_object_exists_in_revision(rev0
, ob1b
) == false);
31 assert(xorn_object_exists_in_revision(rev1
, ob0
) == true);
32 assert(xorn_object_exists_in_revision(rev1
, ob1a
) == false);
33 assert(xorn_object_exists_in_revision(rev1
, ob1b
) == false);
35 assert(xorn_object_exists_in_revision(rev2
, ob0
) == true);
36 assert(xorn_object_exists_in_revision(rev2
, ob1a
) == true);
37 assert(xorn_object_exists_in_revision(rev2
, ob1b
) == true);
39 assert(xorn_object_exists_in_revision(rev3
, ob0
) == true);
40 assert(xorn_object_exists_in_revision(rev3
, ob1a
) == false);
41 assert(xorn_object_exists_in_revision(rev3
, ob1b
) == true);
43 xorn_free_revision(rev3
);
44 xorn_free_revision(rev2
);
45 xorn_free_revision(rev1
);
46 xorn_free_revision(rev0
);