From b93159911b0f165035cde37eb6cc152e758f12f9 Mon Sep 17 00:00:00 2001 From: hobbs Date: Thu, 2 Mar 2000 23:52:55 +0000 Subject: * tests/color.test: * xlib/xcolors.c (XParseColor FindColor): * win/tkWinColor.c (XAllocColor): Fixed bit fiddling for colors to return "correct" values for color mapping. [Bug: 4282] --- tests/color.test | 21 +++++++-------------- tests/font.test | 3 ++- tests/winfo.test | 14 +------------- 3 files changed, 10 insertions(+), 28 deletions(-) diff --git a/tests/color.test b/tests/color.test index 3b86efc..9dbc85a 100644 --- a/tests/color.test +++ b/tests/color.test @@ -5,7 +5,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: color.test,v 1.3 1999/04/16 01:51:36 stanton Exp $ +# RCS: @(#) $Id: color.test,v 1.4 2000/03/02 23:52:55 hobbs Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -189,6 +189,12 @@ test color-2.3 {Tk_GetColor procedure} { test color-2.4 {Tk_GetColor procedure} { list [catch {winfo rgb .t #xyz} msg] $msg } {1 {invalid color name "#xyz"}} +test color-2.5 {Tk_GetColor procedure} { + winfo rgb .t #00FF00 +} {0 65535 0} +test color-2.6 {Tk_GetColor procedure} { + winfo rgb .t red +} {65535 0 0} test color-3.1 {Tk_FreeColor procedure, reference counting} { eval destroy [winfo child .t] @@ -284,16 +290,3 @@ destroy .t # cleanup ::tcltest::cleanupTests return - - - - - - - - - - - - - diff --git a/tests/font.test b/tests/font.test index edc0094..8f9ca8d 100644 --- a/tests/font.test +++ b/tests/font.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: font.test,v 1.5 1999/12/14 06:53:13 hobbs Exp $ +# RCS: @(#) $Id: font.test,v 1.6 2000/03/02 23:52:56 hobbs Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -1357,6 +1357,7 @@ test font-45.3 {TkFontGetAliasList: match} {pcOnly} { font actual {times 10} -family } {Times New Roman} test font-45.4 {TkFontGetAliasList: match} {unixOnly noExceed} { + # can fail on Unix systems that have a real "times new roman" font font actual {{times new roman} 10} -family } [font actual {times 10} -family] diff --git a/tests/winfo.test b/tests/winfo.test index 82bc261..443ab66 100644 --- a/tests/winfo.test +++ b/tests/winfo.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: winfo.test,v 1.4 1999/04/16 01:51:44 stanton Exp $ +# RCS: @(#) $Id: winfo.test,v 1.5 2000/03/02 23:52:57 hobbs Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -367,15 +367,3 @@ foreach i [winfo children .] { # cleanup ::tcltest::cleanupTests return - - - - - - - - - - - - -- cgit v0.12