File: context-stack.scm

package info (click to toggle)
gimp 3.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 222,880 kB
  • sloc: ansic: 870,914; python: 10,965; lisp: 10,857; cpp: 7,355; perl: 4,536; sh: 1,753; xml: 972; yacc: 609; lex: 348; javascript: 150; makefile: 42
file content (43 lines) | stat: -rw-r--r-- 1,005 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
; test stack methods of Context

; push and pop

; We arbitrarily use context:antialias to distinguish context instances.
; Antialias is a setting for the selection tool.
; Antialias is usually true.
; !!! This test depends on it being true initially.

; The two context instances are:
; - original, pushed
; - new one, after a push




; test the sequence push, pop i.e. the normal sequence

; Test initial condition is context:antialias true
(assert-PDB-true `(gimp-context-get-antialias))

; push succeeds
(assert `(gimp-context-push))

; Set antialias false in new context
; FUTURE pass #f
(assert `(gimp-context-set-antialias 0))
(assert-PDB-false `(gimp-context-get-antialias))

; pop succeeds
(assert `(gimp-context-pop))

; pop effective: original context i.e. antialias true
(assert-PDB-true `(gimp-context-get-antialias))



; test abnormal sequence: pop without a prior push.
; Yields an error
(assert-error `(gimp-context-pop)
              "Procedure execution of gimp-context-pop failed")