diff options
Diffstat (limited to 'tests/image.test')
-rw-r--r-- | tests/image.test | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/tests/image.test b/tests/image.test index da65a66..aa3bab8 100644 --- a/tests/image.test +++ b/tests/image.test @@ -2,9 +2,9 @@ # other procedures in the file tkImage.c. It is organized in the # standard fashion for Tcl tests. # -# Copyright (c) 1994 The Regents of the University of California. -# Copyright (c) 1994 Sun Microsystems, Inc. -# Copyright (c) 1998-1999 by Scriptics Corporation. +# Copyright © 1994 The Regents of the University of California. +# Copyright © 1994 Sun Microsystems, Inc. +# Copyright © 1998-1999 by Scriptics Corporation. # All rights reserved. package require tcltest 2.2 @@ -50,7 +50,7 @@ test image-1.6 {Tk_ImageCmd procedure, "create" option} -constraints { expr {$second-$first} } -cleanup { imageCleanup -} -result {1} +} -result 1 test image-1.7 {Tk_ImageCmd procedure, "create" option} -constraints { testImageType @@ -308,14 +308,14 @@ test image-5.7 {Tk_ImageCmd procedure, "type" option} -constraints { } -returnCodes error -result {image "myimage" doesn't exist} -test image-6.1 {Tk_ImageCmd procedure, "types" option} -body { - image types x -} -returnCodes error -result {wrong # args: should be "image types"} -test image-6.2 {Tk_ImageCmd procedure, "types" option} -constraints { +test image-6.1 {Tk_ImageCmd procedure, "types" option} -constraints { testImageType } -body { + image types x +} -returnCodes error -result {wrong # args: should be "image types"} +test image-6.2 {Tk_ImageCmd procedure, "types" option} -body { lsort [image types] -} -result {bitmap oldtest photo test} +} -match glob -result {bitmap*photo test} test image-7.1 {Tk_ImageCmd procedure, "width" option} -body { @@ -357,12 +357,6 @@ test image-8.1 {Tk_ImageCmd procedure, "inuse" option} -constraints { catch {destroy .b} } -result [list 0 1] -if {[tk windowingsystem] == "aqua" && $tcl_platform(osVersion) > 18} { - # Aqua >= 10.14 will redraw the entire image in drawRect. - set result_9_1 {{foo display 0 0 30 15}} -} else { - set result_9_1 {{foo display 5 6 7 8}} -} test image-9.1 {Tk_ImageChanged procedure} -constraints testImageType -setup { .c delete all imageCleanup @@ -385,13 +379,8 @@ test image-9.1 {Tk_ImageChanged procedure} -constraints testImageType -setup { } -cleanup { .c delete all imageCleanup -} -result $result_9_1 -if {[tk windowingsystem] == "aqua" && $tcl_platform(osVersion) > 18} { - # Aqua >= 10.14 will redraw the entire image. - set result_9_2 {{foo display 0 0 30 15} {foo display 0 0 30 15}} -} else { - set result_9_2 {{foo display 5 6 25 9} {foo display 0 0 12 14}} -} +} -result {{foo display 5 6 7 8}} + test image-9.2 {Tk_ImageChanged procedure} -constraints testImageType -setup { .c delete all imageCleanup @@ -411,7 +400,7 @@ test image-9.2 {Tk_ImageChanged procedure} -constraints testImageType -setup { } -cleanup { .c delete all imageCleanup -} -result $result_9_2 +} -result {{foo display 5 6 25 9} {foo display 0 0 12 14}} test image-10.1 {Tk_GetImage procedure} -setup { imageCleanup |