diff --git a/plug-ins/script-fu/test/frameworks/testing.scm b/plug-ins/script-fu/test/frameworks/testing.scm index 91432c5627..1050e1f63d 100644 --- a/plug-ins/script-fu/test/frameworks/testing.scm +++ b/plug-ins/script-fu/test/frameworks/testing.scm @@ -112,7 +112,9 @@ ; except by proximity in the output. (define (test! string) (displayln "") - (displayln string)) + (displayln string) + ; also to GIMP Error Console + (gimp-message string)) ; reset testing state when test framework is loaded diff --git a/plug-ins/script-fu/test/tests/PDB/image/image-new.scm b/plug-ins/script-fu/test/tests/PDB/image/image-new.scm index bf2fe48aea..195ee4ee45 100644 --- a/plug-ins/script-fu/test/tests/PDB/image/image-new.scm +++ b/plug-ins/script-fu/test/tests/PDB/image/image-new.scm @@ -159,7 +159,8 @@ ; Dimension zero yields error ; It does NOT yield invalid ID -1 (assert-error `(gimp-image-new 0 0 RGB) - "argument 1 in call to gimp-image-new has value 0 out of range: 1 to 524288") + "Invalid value for argument 0") +; FORMERLY "argument 1 in call to gimp-image-new has value 0 out of range: 1 to 524288") ; Since 3.0, parameter validation catches this earlier. ; Formerly, "Procedure execution of gimp-image-new failed on invalid input arguments: " diff --git a/plug-ins/script-fu/test/tests/PDB/image/image-precision.scm b/plug-ins/script-fu/test/tests/PDB/image/image-precision.scm index 5e355a96f9..2ed841993c 100644 --- a/plug-ins/script-fu/test/tests/PDB/image/image-precision.scm +++ b/plug-ins/script-fu/test/tests/PDB/image/image-precision.scm @@ -45,14 +45,23 @@ ; New with precision + +; GAMMA obsolete since 3.0 +; PRECISION-U8-GAMMA +; PRECISION-U16-GAMMA +; PRECISION-U32-GAMMA +; PRECISION-HALF-GAMMA +; PRECISION-FLOAT-GAMMA +; PRECISION-DOUBLE-GAMMA + ; setup -(define testImageWithPrecision (car (gimp-image-new-with-precision 21 22 RGB PRECISION-DOUBLE-GAMMA))) +(define testImageWithPrecision (car (gimp-image-new-with-precision 21 22 RGB PRECISION-U8-PERCEPTUAL))) ; image has given precision (assert `(= (car (gimp-image-get-precision ,testImageWithPrecision)) - PRECISION-DOUBLE-GAMMA )) + PRECISION-U8-PERCEPTUAL )) @@ -63,9 +72,8 @@ ,testImage ,precision)))) -; First convert away from first precision in list: +; Assert precision is not first precision in list: ; it will fail if image already that precision -(gimp-image-convert-precision testImage PRECISION-U8-NON-LINEAR) (define allPrecisions `(PRECISION-U8-LINEAR @@ -85,13 +93,7 @@ PRECISION-FLOAT-PERCEPTUAL PRECISION-DOUBLE-LINEAR PRECISION-DOUBLE-NON-LINEAR - PRECISION-DOUBLE-PERCEPTUAL - PRECISION-U8-GAMMA - PRECISION-U16-GAMMA - PRECISION-U32-GAMMA - PRECISION-HALF-GAMMA - PRECISION-FLOAT-GAMMA - PRECISION-DOUBLE-GAMMA)) + PRECISION-DOUBLE-PERCEPTUAL)) ; sequence through all precisions, converting testImage to them (for-each diff --git a/plug-ins/script-fu/test/tests/PDB/paint/dynamics.scm b/plug-ins/script-fu/test/tests/PDB/paint/dynamics.scm index 1ced87f558..e403005e96 100644 --- a/plug-ins/script-fu/test/tests/PDB/paint/dynamics.scm +++ b/plug-ins/script-fu/test/tests/PDB/paint/dynamics.scm @@ -23,7 +23,7 @@ FALSE) ; not closed ; make test harder by using float precision -(gimp-image-convert-precision testImage PRECISION-DOUBLE-GAMMA) +(gimp-image-convert-precision testImage PRECISION-DOUBLE-NON-LINEAR) ; ensure testing is stroking with paint (versus line) (gimp-context-set-stroke-method STROKE-PAINT-METHOD) ; ensure testing is painting with paintbrush (versus pencil, airbrush, etc.) @@ -38,7 +38,8 @@ ; introspection: gimp module returns list of names of dynamics ; second arg is a regex -(assert `(list? (gimp-dynamics-get-list ""))) +; FORMERLY get-list +(assert `(list? (gimp-dynamics-get-name-list ""))) ; refresh: gimp module will load newly installed dynamics ; method is void and should never fail. @@ -67,9 +68,10 @@ ; the dynamics setting can be set to the name of a dynamics -(assert `(gimp-context-set-dynamics "Tilt Angle")) -; setting to false was effective -(assert `(string=? (car (gimp-context-get-dynamics)) +(assert `(gimp-context-set-dynamics-name "Tilt Angle")) +; setting was effective +; formerly context-[set,get]-dynamics +(assert `(string=? (car (gimp-context-get-dynamics-name)) "Tilt Angle")) @@ -81,11 +83,11 @@ ; stroke a drawable along a path with current brush and dynamics -(define dynamicsList (car (gimp-dynamics-get-list ""))) +(define dynamicsList (car (gimp-dynamics-get-name-list ""))) (define (testDynamics dynamics) ; Test that every dynamics can be set on the context - (gimp-context-set-dynamics dynamics) + (gimp-context-set-dynamics-name dynamics) (display dynamics) ; paint with paintbrush and dynamics, under the test harness