Benchmark current behaviour of (calculate-new-attrib-bounds).
[geda-gaf/berndj.git] / gnetlist / tests / libgeda / calculate-new-attrib-bounds.scm
blob2d71b8a3079add9e4ea78590a9a82c566583194a
1 (use-modules (ice-9 format))
2 (let* ((pages (hierarchy-traverse-pages (gnetlist:get-toplevel) 1))
3        (component? (lambda (o) (equal? (get-object-type o) OBJ_COMPLEX)))
4        (components (map (lambda (o) (list o (get-object-attributes o)))
5                         (filter component? (get-objects-in-page (car pages))))))
6   (format #t "~{~{~s\n~{~{  ~s\n~{    ~s\n~}~}~}~}~}"
7           (map (lambda (o)
8                  (list (car o)
9                        (map (lambda (a)
10                               (list a
11                                     (list (calculate-new-attrib-bounds a "Lower Left" -1 -1 -1)
12                                           (calculate-new-attrib-bounds a "Middle Left" -1 -1 -1)
13                                           (calculate-new-attrib-bounds a "Upper Left" -1 -1 -1)
14                                           (calculate-new-attrib-bounds a "Lower Middle" -1 -1 -1)
15                                           (calculate-new-attrib-bounds a "Middle Middle" -1 -1 -1)
16                                           (calculate-new-attrib-bounds a "Upper Middle" -1 -1 -1)
17                                           (calculate-new-attrib-bounds a "Lower Right" -1 -1 -1)
18                                           (calculate-new-attrib-bounds a "Middle Right" -1 -1 -1)
19                                           (calculate-new-attrib-bounds a "Upper Right" -1 -1 -1)
20                                           (calculate-new-attrib-bounds a "Middle Middle" 90 -1 -1)
21                                           (calculate-new-attrib-bounds a "Lower Right" 270 40000 50000)
22                                           (calculate-new-attrib-bounds a "Upper Left" 180 -1 45000)
23                                           )))
24                             (cadr o))))
25                components)))