@@ -422,15 +422,15 @@ func TestBool(t *testing.T) {
422422 values := url.Values {
423423 "Bool" : []string {"true" },
424424 "BoolPtr" : []string {"true" },
425- "BoolArray" : []string {"true " , "t" , "1 " },
425+ "BoolArray" : []string {"off " , "t" , "on " },
426426 "BoolPtrArray[0]" : []string {"true" },
427427 "BoolPtrArray[2]" : []string {"T" },
428428 "BoolArrayArray[0][0]" : []string {"TRUE" },
429429 "BoolArrayArray[0][2]" : []string {"True" },
430430 "BoolArrayArray[2][0]" : []string {"true" },
431431 "BoolPtrArrayArray[0][0]" : []string {"true" },
432- "BoolPtrArrayArray[0][2]" : []string {"true " },
433- "BoolPtrArrayArray[2][0]" : []string {"true " },
432+ "BoolPtrArrayArray[0][2]" : []string {"t " },
433+ "BoolPtrArrayArray[2][0]" : []string {"1 " },
434434 "BoolMap[true]" : []string {"true" },
435435 "BoolPtrMap[t]" : []string {"true" },
436436 }
@@ -448,7 +448,7 @@ func TestBool(t *testing.T) {
448448 Equal (t , * test .BoolPtr , true )
449449
450450 Equal (t , len (test .BoolArray ), 4 )
451- Equal (t , test .BoolArray [0 ], true )
451+ Equal (t , test .BoolArray [0 ], false )
452452 Equal (t , test .BoolArray [1 ], true )
453453 Equal (t , test .BoolArray [2 ], true )
454454 Equal (t , test .BoolArray [3 ], false )
@@ -658,18 +658,18 @@ func TestErrors(t *testing.T) {
658658 }
659659
660660 values := url.Values {
661- "bool" : []string {"yes " },
662- "Int" : []string {"bad" },
663- "Uint" : []string {"bad" },
664- "Float32" : []string {"bad" },
665- "String" : []string {"str bad return val" },
666- "Time" : []string {"bad" },
667- "MapBadIntKey[key]" : []string {"1" },
668- "MapBadUintKey[key]" : []string {"1" },
669- "MapBadFloatKey[key]" : []string {"1.1" },
670- "MapBadBoolKey[yes ]" : []string {"true" },
671- "MapBadKeyType[1.4]" : []string {"5" },
672- "BadArrayValue[0]" : []string {"badintval" },
661+ "bool" : []string {"uh-huh " },
662+ "Int" : []string {"bad" },
663+ "Uint" : []string {"bad" },
664+ "Float32" : []string {"bad" },
665+ "String" : []string {"str bad return val" },
666+ "Time" : []string {"bad" },
667+ "MapBadIntKey[key]" : []string {"1" },
668+ "MapBadUintKey[key]" : []string {"1" },
669+ "MapBadFloatKey[key]" : []string {"1.1" },
670+ "MapBadBoolKey[uh-huh ]" : []string {"true" },
671+ "MapBadKeyType[1.4]" : []string {"5" },
672+ "BadArrayValue[0]" : []string {"badintval" },
673673 }
674674
675675 var test TestError
@@ -686,7 +686,7 @@ func TestErrors(t *testing.T) {
686686
687687 err := errs .(DecodeErrors )
688688 k := err ["bool" ]
689- Equal (t , k .Error (), "Invalid Boolean Value 'yes ' Type 'bool' Namespace 'bool'" )
689+ Equal (t , k .Error (), "Invalid Boolean Value 'uh-huh ' Type 'bool' Namespace 'bool'" )
690690
691691 k = err ["Int" ]
692692 Equal (t , k .Error (), "Invalid Integer Value 'bad' Type 'int' Namespace 'Int'" )
@@ -713,7 +713,7 @@ func TestErrors(t *testing.T) {
713713 Equal (t , k .Error (), "Invalid Float Value 'key' Type 'float32' Namespace 'MapBadFloatKey'" )
714714
715715 k = err ["MapBadBoolKey" ]
716- Equal (t , k .Error (), "Invalid Boolean Value 'yes ' Type 'bool' Namespace 'MapBadBoolKey'" )
716+ Equal (t , k .Error (), "Invalid Boolean Value 'uh-huh ' Type 'bool' Namespace 'MapBadBoolKey'" )
717717
718718 k = err ["MapBadKeyType" ]
719719 Equal (t , k .Error (), "Unsupported Map Key '1.4', Type 'complex64' Namespace 'MapBadKeyType'" )
0 commit comments