File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -11,14 +11,14 @@ import (
1111
1212func TestElementByKey (t * testing.T ) {
1313 vin := dyn .V ([]dyn.Value {
14- dyn .V (map [string ]dyn.Value {
15- "key" : dyn .V ("foo" ),
16- "value" : dyn .V (42 ),
17- }),
1814 dyn .V (map [string ]dyn.Value {
1915 "key" : dyn .V ("bar" ),
2016 "value" : dyn .V (43 ),
2117 }),
18+ dyn .V (map [string ]dyn.Value {
19+ "key" : dyn .V ("foo" ),
20+ "value" : dyn .V (42 ),
21+ }),
2222 dyn .V (map [string ]dyn.Value {
2323 // Use upper case key to test that the resulting element has its
2424 // key field assigned to the output of the key function.
@@ -36,14 +36,14 @@ func TestElementByKey(t *testing.T) {
3636 require .NoError (t , err )
3737 assert .Len (t , vout .MustSequence (), 2 )
3838 assert .Equal (t ,
39- vout .Index (0 ).AsAny (),
39+ vout .Index (1 ).AsAny (),
4040 map [string ]any {
4141 "key" : "foo" ,
4242 "value" : 44 ,
4343 },
4444 )
4545 assert .Equal (t ,
46- vout .Index (1 ).AsAny (),
46+ vout .Index (0 ).AsAny (),
4747 map [string ]any {
4848 "key" : "bar" ,
4949 "value" : 43 ,
@@ -53,14 +53,14 @@ func TestElementByKey(t *testing.T) {
5353
5454func TestElementByKeyWithOverride (t * testing.T ) {
5555 vin := dyn .V ([]dyn.Value {
56- dyn .V (map [string ]dyn.Value {
57- "key" : dyn .V ("foo" ),
58- "value" : dyn .V (42 ),
59- }),
6056 dyn .V (map [string ]dyn.Value {
6157 "key" : dyn .V ("bar" ),
6258 "value" : dyn .V (43 ),
6359 }),
60+ dyn .V (map [string ]dyn.Value {
61+ "key" : dyn .V ("foo" ),
62+ "value" : dyn .V (42 ),
63+ }),
6464 dyn .V (map [string ]dyn.Value {
6565 "key" : dyn .V ("foo" ),
6666 "othervalue" : dyn .V (44 ),
@@ -75,14 +75,14 @@ func TestElementByKeyWithOverride(t *testing.T) {
7575 require .NoError (t , err )
7676 assert .Len (t , vout .MustSequence (), 2 )
7777 assert .Equal (t ,
78- vout .Index (0 ).AsAny (),
78+ vout .Index (1 ).AsAny (),
7979 map [string ]any {
8080 "key" : "foo" ,
8181 "othervalue" : 44 ,
8282 },
8383 )
8484 assert .Equal (t ,
85- vout .Index (1 ).AsAny (),
85+ vout .Index (0 ).AsAny (),
8686 map [string ]any {
8787 "key" : "bar" ,
8888 "value" : 43 ,
You can’t perform that action at this time.
0 commit comments