netlist: Fix component refdes mangling
[geda-gaf.git] / tests / storage / null.c
blobda97cffb53594492b3310abb7b276cb2f22d71c8
1 /* Copyright (C) 2013-2020 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. */
17 #include "Setup.h"
19 #define NO_ERROR ((xorn_error_t) -1)
22 int main(void)
24 xorn_revision_t rev0, rev1, rev2, rev3;
25 xorn_object_t ob0, ob1a, ob1b;
27 xorn_revision_t rev4;
28 xorn_error_t err;
30 setup(&rev0, &rev1, &rev2, &rev3, &ob0, &ob1a, &ob1b);
32 rev4 = xorn_new_revision(rev3);
33 assert(rev4 != NULL);
35 err = NO_ERROR;
36 assert(xornsch_add_line(rev4, NULL, &err) == NULL);
37 assert(err == xorn_error_invalid_argument);
39 err = NO_ERROR;
40 assert(xornsch_set_line_data(rev4, ob0, NULL, &err) == -1);
41 assert(err == xorn_error_invalid_argument);
43 xorn_finalize_revision(rev4);
45 xorn_free_revision(rev4);
46 xorn_free_revision(rev3);
47 xorn_free_revision(rev2);
48 xorn_free_revision(rev1);
49 xorn_free_revision(rev0);
50 return 0;