From c411bb62c886240f5cbd8f59c5c3c8ff5c9f5754 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Fri, 5 Aug 2005 18:24:52 +0000 Subject: Cleaned up [binary scan] testing for NaN [Bug 1246264] --- ChangeLog | 9 ++++++--- tests/binary.test | 35 ++++++++++++++++------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 84b84b6..6569bf9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,11 @@ 2005-08-05 Kevin Kenny - * win/makefile.vc: Removed unused file ldAout.tcl. - * win/makefile.bc: [Bug #1244361] - + * win/makefile.vc: Removed unused file ldAout.tcl. + * win/makefile.bc: [Bug #1244361] + + * tests/binary.test: Cleaned up testing for scanning of NaN. + [Bug #1246264] + 2005-08-04 Andreas Kupries * generic/tclIO.c (CloseChannel): Fixed comment nit, added diff --git a/tests/binary.test b/tests/binary.test index fb934d8..d0491ff 100644 --- a/tests/binary.test +++ b/tests/binary.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: binary.test,v 1.20 2005/05/10 20:17:43 kennykb Exp $ +# RCS: @(#) $Id: binary.test,v 1.21 2005/08/05 18:25:00 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -1384,24 +1384,21 @@ test binary-39.5 {ScanNumber: sign extension} { list [binary scan \x01\x01\x01\x02\x81\x01\x01\x01\x01\x82\x01\x01\x01\x01\x82\x01\x01\x01\x01\x81 I5 arg1] $arg1 } {1 {16843010 -2130640639 25297153 16876033 16843137}} -test binary-40.1 {ScanNumber: floating point overflow} {nonPortable bigEndian} { - catch {unset arg1} - list [binary scan \xff\xff\xff\xff f1 arg1] $arg1 -} {1 -NaN} -test binary-40.3 {ScanNumber: floating point overflow} {littleEndian win} { - catch {unset arg1} - set result [binary scan \xff\xff\xff\xff f1 arg1] - lappend result [regexp -nocase NaN $arg1] -} {1 1} -test binary-40.4 {ScanNumber: floating point overflow} {nonPortable bigEndian} { - catch {unset arg1} - list [binary scan \xff\xff\xff\xff\xff\xff\xff\xff d1 arg1] $arg1 -} {1 -NaN} -test binary-40.6 {ScanNumber: floating point overflow} {littleEndian win} { - catch {unset arg1} - set result [binary scan \xff\xff\xff\xff\xff\xff\xff\xff d1 arg1] - lappend result [regexp -nocase NaN $arg1] -} {1 1} +test binary-40.3 {ScanNumber: NaN} \ + -body { + catch {unset arg1} + list [binary scan \xff\xff\xff\xff f1 arg1] $arg1 + } \ + -match glob \ + -result {1 -NaN*} + +test binary-40.4 {ScanNumber: NaN} \ + -body { + catch {unset arg1} + list [binary scan \xff\xff\xff\xff\xff\xff\xff\xff d arg1] $arg1 + } \ + -match glob \ + -result {1 -NaN*} test binary-41.1 {ScanNumber: word alignment} { catch {unset arg1; unset arg2} -- cgit v0.12