Tk Library Source Code

View Ticket
Login
Ticket UUID: 2169167
Title: test failures
Type: Bug Version: None
Submitter: dgp Created on: 2008-10-15 18:43:54
Subsystem: json Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2009-04-18 06:41:56
Resolution: Fixed Closed By: kanryu6
    Closed on: 2009-04-17 23:41:56
Description:
Running Tcl 8.4.19 with the
package "dict 8.5.1", I see
these test failures:

---- json-1.1 start

==== json-1.1 test JSON widget FAILED
==== Contents of test case:
set res [json::json2dict $JSON(widget)]
---- Result was:
widget {window {width 500 height 500 name main_window title {Sample Widget}} text {vOffset 100 name null style bold data {Click Here} onMouseUp {sun1.opacity = (sun1.opacity / 100) * 90;} alignment center hOffset 250 size 36} debug on}
---- Result should have been (exact matching):
widget {debug on window {title {Sample Widget} name main_window width 500 height 500} text {data {Click Here} size 36 style bold name null hOffset 250 vOffset 100 alignment center onMouseUp {sun1.opacity = (sun1.opacity / 100) * 90;}}}
==== json-1.1 FAILED

---- json-1.2 start

==== json-1.2 test JSON glossary FAILED
==== Contents of test case:
set res [json::json2dict $JSON(glossary)]
---- Result was:
glossary {mixlist {{a "" str} -0.09 null {} {member true}} title {example glossary} GlossDiv {GlossList {{GlossSeeAlso {GML XML markup} GlossTerm {Standard \" Language} Acronym SGML\\ ID SGML Abbrev {ISO 8879:1986} GlossDef {A meta-markup language, used ...}}} title S}}
---- Result should have been (exact matching):
glossary {title {example glossary} mixlist {{a "" str} -0.09 null {} {member true}} GlossDiv {title S GlossList {{ID SGML GlossTerm {Standard \" Language} Acronym SGML\\ Abbrev {ISO 8879:1986} GlossDef {A meta-markup language, used ...} GlossSeeAlso {GML XML markup}}}}}
==== json-1.2 FAILED

==== json-1.4 test JSON menu FAILED
==== Contents of test case:
set res [json::json2dict $JSON(menu)]
---- Result was:
menu {popup {menuitem {{value Open onclick OpenDoc()} {value Close onclick CloseDoc()}}} value File: id file unival 怡:}
---- Result should have been (exact matching):
menu {id file value File: unival 怡: popup {menuitem {{value Open onclick OpenDoc()} {value Close onclick CloseDoc()}}}}
==== json-1.4 FAILED
==== json-1.8 test JSON menu2 FAILED
==== Contents of test case:
set res [json::json2dict $JSON(menu2)]
---- Result was:
menu {header Viewer items {{id Open} {label {Open New} id OpenNew} null {label {Zoom In} id ZoomIn} {label {Zoom Out} id ZoomOut} null {id Help} {label {About Viewer...} id About}}}
---- Result should have been (exact matching):
menu {header Viewer items {{id Open} {id OpenNew label {Open New}} null {id ZoomIn label {Zoom In}} {id ZoomOut label {Zoom Out}} null {id Help} {id About label {About Viewer...}}}}
==== json-1.8 FAILED

==== json-1.9 test JSON array FAILED
==== Contents of test case:
set res [json::json2dict $JSON(array)]
---- Result was:
{Country US Latitude 37.7668 precision zip State CA City {SAN FRANCISCO} Address {} Zip 94107 Longitude -122.3959} {Country US Latitude 37.371991 precision zip State CA City SUNNYVALE Address {} Zip 94085 Longitude -122.026020}
---- Result should have been (exact matching):
{precision zip Latitude 37.7668 Longitude -122.3959 Address {} City {SAN FRANCISCO} State CA Zip 94107 Country US} {precision zip Latitude 37.371991 Longitude -122.026020 Address {} City SUNNYVALE State CA Zip 94085 Country US}
==== json-1.9 FAILED
User Comments: kanryu6 added on 2009-04-18 06:41:56:

allow_comments - 1

kanryu6 added on 2009-04-18 06:41:48:
fixed at CVS HEAD

kanryu6 added on 2008-11-12 09:38:19:
I think that those test failure is caused not by json module but by dict comparison.

I might recommend to use proc dictsort2 in yaml.test for the tests.