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 (define (apitest:run cmd port)
18 (simple-format port "~S\n" cmd)
19 (let ((result (primitive-eval cmd)))
22 (display "<<<<<\n" port)
23 (for-each (lambda (x) (simple-format port "~S\n" x)) result)
24 (display ">>>>>\n" port))
25 (simple-format port "~S\n" result)))
28 (define (apitest output-filename)
29 (let ((port (open-output-file output-filename)))
30 (apitest:run '(gnetlist:get-packages "placeholder") port)
31 (apitest:run '(gnetlist:get-non-unique-packages "placeholder") port)
32 (apitest:run '(gnetlist:get-all-nets "placeholder") port)
33 (apitest:run '(gnetlist:get-all-unique-nets "placeholder") port)
35 (apitest:run '(gnetlist:get-toplevel-attribute "tnMERqW0") port)
39 (apitest:run `(gnetlist:get-pins ,refdes) port)
40 (apitest:run `(gnetlist:get-pins-nets ,refdes) port)
41 (apitest:run `(gnetlist:vams-get-package-attributes ,refdes) port)
42 (apitest:run `(gnetlist:get-all-package-attributes
43 ,refdes "device") port)
47 (apitest:run `(gnetlist:get-nets ,refdes ,pin) port)
49 (apitest:run `(gnetlist:get-attribute-by-pinnumber
50 ,refdes ,pin "pinnumber") port)
51 (apitest:run `(gnetlist:get-attribute-by-pinnumber
52 ,refdes ,pin "pinseq") port)
53 (apitest:run `(gnetlist:get-attribute-by-pinnumber
54 ,refdes ,pin "pinlabel") port)
55 (apitest:run `(gnetlist:get-attribute-by-pinnumber
56 ,refdes ,pin "pintype") port)
58 (let ((pinseq (gnetlist:get-attribute-by-pinnumber
59 refdes pin "pinseq")))
60 (apitest:run `(gnetlist:get-attribute-by-pinseq
61 ,refdes ,pinseq "pinnumber") port)
62 (apitest:run `(gnetlist:get-attribute-by-pinseq
63 ,refdes ,pinseq "pinseq") port)
64 (apitest:run `(gnetlist:get-attribute-by-pinseq
65 ,refdes ,pinseq "pinlabel") port)
66 (apitest:run `(gnetlist:get-attribute-by-pinseq
67 ,refdes ,pinseq "pintype") port)))
68 (gnetlist:get-pins refdes)))
69 (gnetlist:get-packages "placeholder"))
71 (apitest:run '(gnetlist:get-pins "tnMERqW0") port)
72 (apitest:run '(gnetlist:get-pins-nets "tnMERqW0") port)
73 (apitest:run '(gnetlist:vams-get-package-attributes "tnMERqW0") port)
77 (apitest:run `(gnetlist:get-all-connections ,netname) port)
78 (apitest:run `(gnetlist:graphical-objs-in-net-with-attrib-get-attrib
79 ,netname "device=DRC_Directive" "value") port))
80 (gnetlist:get-all-unique-nets "placeholder"))
82 (apitest:run '(gnetlist:get-all-connections "tnMERqW0") port)
83 (apitest:run '(gnetlist:graphical-objs-in-net-with-attrib-get-attrib
84 "tnMERqW0" "device=DRC_Directive" "value") port)
86 (apitest:run '(gnetlist:get-backend-arguments) port)
87 ;(apitest:run '(gnetlist:get-input-files) port)
88 (apitest:run '(gnetlist:get-verbosity) port)
90 (close-output-port port)))