Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve output on vm tests #775

Merged
merged 2 commits into from
May 18, 2023

Conversation

ajnavarro
Copy link
Contributor

@ajnavarro ajnavarro commented Apr 25, 2023

Instead of printing the expected and actual output, create a diff to see what specifically changed.

Before:

panic: fail on files/zrealm_tests0.gno: got:
switchrealm["gno.land/r/demo/tests"]
c[0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:10]={
    "Fields": [
        {
            "T": {
                "@type": "/gno.PrimitiveType",
                "value": "16"
            },
            "V": {
                "@type": "/gno.StringValue",
                "value": "three"
            }
        }
    ],
    "ObjectInfo": {
        "ID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:10",
        "ModTime": "0",
        "OwnerID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:9",
        "RefCount": "1"
    }
}
c[0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:9]={
    "Data": null,
    "List": [
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests_foo.FooStringer"
                }
            },
            "V": {
                "@type": "/gno.PointerValue",
                "Base": null,
                "Index": "0",
                "TV": {
                    "T": {
                        "@type": "/gno.RefType",
                        "ID": "gno.land/r/demo/tests_foo.FooStringer"
                    },
                    "V": {
                        "@type": "/gno.RefValue",
                        "Hash": "94c14b2efc4bb2f3c24ee42292f161fd1ebd72a3",
                        "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:6"
                    }
                }
            }
        },
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests_foo.FooStringer"
                }
            },
            "V": {
                "@type": "/gno.PointerValue",
                "Base": null,
                "Index": "0",
                "TV": {
                    "T": {
                        "@type": "/gno.RefType",
                        "ID": "gno.land/r/demo/tests_foo.FooStringer"
                    },
                    "V": {
                        "@type": "/gno.RefValue",
                        "Hash": "1e36da78d1dc72e5cbac56c27590332574c89678",
                        "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:8"
                    }
                }
            }
        },
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests_foo.FooStringer"
                }
            },
            "V": {
                "@type": "/gno.PointerValue",
                "Base": null,
                "Index": "0",
                "TV": {
                    "T": {
                        "@type": "/gno.RefType",
                        "ID": "gno.land/r/demo/tests_foo.FooStringer"
                    },
                    "V": {
                        "@type": "/gno.RefValue",
                        "Hash": "43b13870b750f78cda919fa13a5d955d297242bd",
                        "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:10"
                    }
                }
            }
        }
    ],
    "ObjectInfo": {
        "ID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:9",
        "ModTime": "0",
        "OwnerID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:2",
        "RefCount": "1"
    }
}
u[0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:2]={
    "Blank": {},
    "ObjectInfo": {
        "ID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:2",
        "IsEscaped": true,
        "ModTime": "8",
        "RefCount": "3"
    },
    "Parent": null,
    "Source": {
        "@type": "/gno.RefNode",
        "BlockNode": null,
        "Location": {
            "File": "",
            "Line": "0",
            "Nonce": "0",
            "PkgPath": "gno.land/r/demo/tests"
        }
    },
    "Values": [
        {
            "T": {
                "@type": "/gno.TypeType"
            },
            "V": {
                "@type": "/gno.TypeValue",
                "Type": {
                    "@type": "/gno.DeclaredType",
                    "Base": {
                        "@type": "/gno.InterfaceType",
                        "Generic": "",
                        "Methods": [
                            {
                                "Embedded": false,
                                "Name": "String",
                                "Tag": "",
                                "Type": {
                                    "@type": "/gno.FuncType",
                                    "Params": [],
                                    "Results": [
                                        {
                                            "Embedded": false,
                                            "Name": "",
                                            "Tag": "",
                                            "Type": {
                                                "@type": "/gno.PrimitiveType",
                                                "value": "16"
                                            }
                                        }
                                    ]
                                }
                            }
                        ],
                        "PkgPath": "gno.land/r/demo/tests"
                    },
                    "Methods": [],
                    "Name": "Stringer",
                    "PkgPath": "gno.land/r/demo/tests"
                }
            }
        },
        {
            "T": {
                "@type": "/gno.TypeType"
            },
            "V": {
                "@type": "/gno.TypeValue",
                "Type": {
                    "@type": "/gno.DeclaredType",
                    "Base": {
                        "@type": "/gno.StructType",
                        "Fields": [
                            {
                                "Embedded": false,
                                "Name": "Field",
                                "Tag": "",
                                "Type": {
                                    "@type": "/gno.PrimitiveType",
                                    "value": "16"
                                }
                            }
                        ],
                        "PkgPath": "gno.land/r/demo/tests"
                    },
                    "Methods": [
                        {
                            "T": {
                                "@type": "/gno.FuncType",
                                "Params": [
                                    {
                                        "Embedded": false,
                                        "Name": "t",
                                        "Tag": "",
                                        "Type": {
                                            "@type": "/gno.PointerType",
                                            "Elt": {
                                                "@type": "/gno.RefType",
                                                "ID": "gno.land/r/demo/tests.TestRealmObject"
                                            }
                                        }
                                    }
                                ],
                                "Results": []
                            },
                            "V": {
                                "@type": "/gno.FuncValue",
                                "Closure": null,
                                "FileName": "tests.gno",
                                "IsMethod": true,
                                "Name": "Modify",
                                "PkgPath": "gno.land/r/demo/tests",
                                "Source": {
                                    "@type": "/gno.RefNode",
                                    "BlockNode": null,
                                    "Location": {
                                        "File": "tests.gno",
                                        "Line": "38",
                                        "Nonce": "0",
                                        "PkgPath": "gno.land/r/demo/tests"
                                    }
                                },
                                "Type": {
                                    "@type": "/gno.FuncType",
                                    "Params": [
                                        {
                                            "Embedded": false,
                                            "Name": "t",
                                            "Tag": "",
                                            "Type": {
                                                "@type": "/gno.PointerType",
                                                "Elt": {
                                                    "@type": "/gno.RefType",
                                                    "ID": "gno.land/r/demo/tests.TestRealmObject"
                                                }
                                            }
                                        }
                                    ],
                                    "Results": []
                                }
                            }
                        },
                        {
                            "T": {
                                "@type": "/gno.FuncType",
                                "Params": [
                                    {
                                        "Embedded": false,
                                        "Name": "t",
                                        "Tag": "",
                                        "Type": {
                                            "@type": "/gno.PointerType",
                                            "Elt": {
                                                "@type": "/gno.RefType",
                                                "ID": "gno.land/r/demo/tests.TestRealmObject"
                                            }
                                        }
                                    }
                                ],
                                "Results": []
                            },
                            "V": {
                                "@type": "/gno.FuncValue",
                                "Closure": null,
                                "FileName": "tests.gno",
                                "IsMethod": true,
                                "Name": "Modify",
                                "PkgPath": "gno.land/r/demo/tests",
                                "Source": {
                                    "@type": "/gno.RefNode",
                                    "BlockNode": null,
                                    "Location": {
                                        "File": "tests.gno",
                                        "Line": "38",
                                        "Nonce": "0",
                                        "PkgPath": "gno.land/r/demo/tests"
                                    }
                                },
                                "Type": {
                                    "@type": "/gno.FuncType",
                                    "Params": [
                                        {
                                            "Embedded": false,
                                            "Name": "t",
                                            "Tag": "",
                                            "Type": {
                                                "@type": "/gno.PointerType",
                                                "Elt": {
                                                    "@type": "/gno.RefType",
                                                    "ID": "gno.land/r/demo/tests.TestRealmObject"
                                                }
                                            }
                                        }
                                    ],
                                    "Results": []
                                }
                            }
                        }
                    ],
                    "Name": "TestRealmObject",
                    "PkgPath": "gno.land/r/demo/tests"
                }
            }
        },
        {
            "T": {
                "@type": "/gno.TypeType"
            },
            "V": {
                "@type": "/gno.TypeValue",
                "Type": {
                    "@type": "/gno.DeclaredType",
                    "Base": {
                        "@type": "/gno.StructType",
                        "Fields": [
                            {
                                "Embedded": false,
                                "Name": "Name",
                                "Tag": "",
                                "Type": {
                                    "@type": "/gno.PrimitiveType",
                                    "value": "16"
                                }
                            },
                            {
                                "Embedded": false,
                                "Name": "Child",
                                "Tag": "",
                                "Type": {
                                    "@type": "/gno.PointerType",
                                    "Elt": {
                                        "@type": "/gno.RefType",
                                        "ID": "gno.land/r/demo/tests.TestNode"
                                    }
                                }
                            }
                        ],
                        "PkgPath": "gno.land/r/demo/tests"
                    },
                    "Methods": [],
                    "Name": "TestNode",
                    "PkgPath": "gno.land/r/demo/tests"
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [
                    {
                        "Embedded": false,
                        "Name": "str",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.RefType",
                            "ID": "gno.land/r/demo/tests.Stringer"
                        }
                    }
                ],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:3"
                },
                "FileName": "interfaces.gno",
                "IsMethod": false,
                "Name": "AddStringer",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "interfaces.gno",
                        "Line": "13",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [
                        {
                            "Embedded": false,
                            "Name": "str",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.RefType",
                                "ID": "gno.land/r/demo/tests.Stringer"
                            }
                        }
                    ],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [
                    {
                        "Embedded": false,
                        "Name": "path",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.PrimitiveType",
                            "value": "16"
                        }
                    }
                ],
                "Results": [
                    {
                        "Embedded": false,
                        "Name": "",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.PrimitiveType",
                            "value": "16"
                        }
                    }
                ]
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:3"
                },
                "FileName": "interfaces.gno",
                "IsMethod": false,
                "Name": "Render",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "interfaces.gno",
                        "Line": "20",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [
                        {
                            "Embedded": false,
                            "Name": "path",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.PrimitiveType",
                                "value": "16"
                            }
                        }
                    ],
                    "Results": [
                        {
                            "Embedded": false,
                            "Name": "",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.PrimitiveType",
                                "value": "16"
                            }
                        }
                    ]
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "IncCounter",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "7",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": [
                    {
                        "Embedded": false,
                        "Name": "",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.PrimitiveType",
                            "value": "32"
                        }
                    }
                ]
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "Counter",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "11",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": [
                        {
                            "Embedded": false,
                            "Name": "",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.PrimitiveType",
                                "value": "32"
                            }
                        }
                    ]
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": [
                    {
                        "Embedded": false,
                        "Name": "",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.PrimitiveType",
                            "value": "16"
                        }
                    }
                ]
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "CurrentRealmPath",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "15",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": [
                        {
                            "Embedded": false,
                            "Name": "",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.PrimitiveType",
                                "value": "16"
                            }
                        }
                    ]
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "AssertOriginCall",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "19",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": [
                    {
                        "Embedded": false,
                        "Name": "",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.PrimitiveType",
                            "value": "4"
                        }
                    }
                ]
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "IsOriginCall",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "23",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": [
                        {
                            "Embedded": false,
                            "Name": "",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.PrimitiveType",
                                "value": "4"
                            }
                        }
                    ]
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [
                    {
                        "Embedded": false,
                        "Name": "t",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.PointerType",
                            "Elt": {
                                "@type": "/gno.RefType",
                                "ID": "gno.land/r/demo/tests.TestRealmObject"
                            }
                        }
                    }
                ],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "ModifyTestRealmObject",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "34",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [
                        {
                            "Embedded": false,
                            "Name": "t",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.PointerType",
                                "Elt": {
                                    "@type": "/gno.RefType",
                                    "ID": "gno.land/r/demo/tests.TestRealmObject"
                                }
                            }
                        }
                    ],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "InitTestNodes",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "56",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "ModTestNodes",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "61",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "PrintTestNodes",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "69",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.SliceType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests.Stringer"
                },
                "Vrd": false
            },
            "V": {
                "@type": "/gno.SliceValue",
                "Base": {
                    "@type": "/gno.RefValue",
                    "Hash": "5e5535af7afef6f523a897c051944639ef56c057",
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:9"
                },
                "Length": "3",
                "Maxcap": "3",
                "Offset": "0"
            }
        },
        {
            "T": {
                "@type": "/gno.PrimitiveType",
                "value": "32"
            }
        },
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests.TestNode"
                }
            }
        },
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests.TestNode"
                }
            }
        },
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests.TestNode"
                }
            }
        }
    ]
}
d[0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:7]
switchrealm["gno.land/r/demo/tests_foo"]
switchrealm["gno.land/r/demo/tests_foo"]
switchrealm["gno.land/r/demo/tests_foo"]
switchrealm["gno.land/r/demo/tests_foo"]
switchrealm["gno.land/r/demo/tests"]
switchrealm["gno.land/r/demo/tests_test"]

want:
switchrealm["gno.land/r/demo/tests"]
c[0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:10]={
    "Fields": [
        {
            "T": {
                "@type": "/gno.PrimitiveType",
                "value": "16"
            },
            "V": {
                "@type": "/gno.StringValue",
                "value": "three"
            }
        }
    ],
    "ObjectInfo": {
        "ID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:10",
        "ModTime": "0",
        "OwnerID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:9",
        "RefCount": "1"
    }
}
c[0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:9]={
    "Data": null,
    "List": [
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests_foo.FooStringer"
                }
            },
            "V": {
                "@type": "/gno.PointerValue",
                "Base": null,
                "Index": "0",
                "TV": {
                    "T": {
                        "@type": "/gno.RefType",
                        "ID": "gno.land/r/demo/tests_foo.FooStringer"
                    },
                    "V": {
                        "@type": "/gno.RefValue",
                        "Hash": "94c14b2efc4bb2f3c24ee42292f161fd1ebd72a3",
                        "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:6"
                    }
                }
            }
        },
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests_foo.FooStringer"
                }
            },
            "V": {
                "@type": "/gno.PointerValue",
                "Base": null,
                "Index": "0",
                "TV": {
                    "T": {
                        "@type": "/gno.RefType",
                        "ID": "gno.land/r/demo/tests_foo.FooStringer"
                    },
                    "V": {
                        "@type": "/gno.RefValue",
                        "Hash": "1e36da78d1dc72e5cbac56c27590332574c89678",
                        "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:8"
                    }
                }
            }
        },
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests_foo.FooStringer"
                }
            },
            "V": {
                "@type": "/gno.PointerValue",
                "Base": null,
                "Index": "0",
                "TV": {
                    "T": {
                        "@type": "/gno.RefType",
                        "ID": "gno.land/r/demo/tests_foo.FooStringer"
                    },
                    "V": {
                        "@type": "/gno.RefValue",
                        "Hash": "43b13870b750f78cda919fa13a5d955d297242bd",
                        "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:10"
                    }
                }
            }
        }
    ],
    "ObjectInfo": {
        "ID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:9",
        "ModTime": "0",
        "OwnerID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:2",
        "RefCount": "1"
    }
}
u[0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:2]={
    "Blank": {},
    "ObjectInfo": {
        "ID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:2",
        "IsEscaped": true,
        "ModTime": "8",
        "RefCount": "3"
    },
    "Parent": null,
    "Source": {
        "@type": "/gno.RefNode",
        "BlockNode": null,
        "Location": {
            "File": "",
            "Line": "0",
            "Nonce": "0",
            "PkgPath": "gno.land/r/demo/tests"
        }
    },
    "Values": [
        {
            "T": {
                "@type": "/gno.TypeType"
            },
            "V": {
                "@type": "/gno.TypeValue",
                "Type": {
                    "@type": "/gno.DeclaredType",
                    "Base": {
                        "@type": "/gno.InterfaceType",
                        "Generic": "",
                        "Methods": [
                            {
                                "Embedded": false,
                                "Name": "String",
                                "Tag": "",
                                "Type": {
                                    "@type": "/gno.FuncType",
                                    "Params": [],
                                    "Results": [
                                        {
                                            "Embedded": false,
                                            "Name": "",
                                            "Tag": "",
                                            "Type": {
                                                "@type": "/gno.PrimitiveType",
                                                "value": "16"
                                            }
                                        }
                                    ]
                                }
                            }
                        ],
                        "PkgPath": "gno.land/r/demo/tests"
                    },
                    "Methods": [],
                    "Name": "Stringer",
                    "PkgPath": "gno.land/r/demo/tests"
                }
            }
        },
        {
            "T": {
                "@type": "/gno.TypeType"
            },
            "V": {
                "@type": "/gno.TypeValue",
                "Type": {
                    "@type": "/gno.DeclaredType",
                    "Base": {
                        "@type": "/gno.StructType",
                        "Fields": [
                            {
                                "Embedded": false,
                                "Name": "Field",
                                "Tag": "",
                                "Type": {
                                    "@type": "/gno.PrimitiveType",
                                    "value": "16"
                                }
                            }
                        ],
                        "PkgPath": "gno.land/r/demo/tests"
                    },
                    "Methods": [
                        {
                            "T": {
                                "@type": "/gno.FuncType",
                                "Params": [
                                    {
                                        "Embedded": false,
                                        "Name": "t",
                                        "Tag": "",
                                        "Type": {
                                            "@type": "/gno.PointerType",
                                            "Elt": {
                                                "@type": "/gno.RefType",
                                                "ID": "gno.land/r/demo/tests.TestRealmObject"
                                            }
                                        }
                                    }
                                ],
                                "Results": []
                            },
                            "V": {
                                "@type": "/gno.FuncValue",
                                "Closure": null,
                                "FileName": "tests.gno",
                                "IsMethod": true,
                                "Name": "Modify",
                                "PkgPath": "gno.land/r/demo/tests",
                                "Source": {
                                    "@type": "/gno.RefNode",
                                    "BlockNode": null,
                                    "Location": {
                                        "File": "tests.gno",
                                        "Line": "28",
                                        "Nonce": "0",
                                        "PkgPath": "gno.land/r/demo/tests"
                                    }
                                },
                                "Type": {
                                    "@type": "/gno.FuncType",
                                    "Params": [
                                        {
                                            "Embedded": false,
                                            "Name": "t",
                                            "Tag": "",
                                            "Type": {
                                                "@type": "/gno.PointerType",
                                                "Elt": {
                                                    "@type": "/gno.RefType",
                                                    "ID": "gno.land/r/demo/tests.TestRealmObject"
                                                }
                                            }
                                        }
                                    ],
                                    "Results": []
                                }
                            }
                        },
                        {
                            "T": {
                                "@type": "/gno.FuncType",
                                "Params": [
                                    {
                                        "Embedded": false,
                                        "Name": "t",
                                        "Tag": "",
                                        "Type": {
                                            "@type": "/gno.PointerType",
                                            "Elt": {
                                                "@type": "/gno.RefType",
                                                "ID": "gno.land/r/demo/tests.TestRealmObject"
                                            }
                                        }
                                    }
                                ],
                                "Results": []
                            },
                            "V": {
                                "@type": "/gno.FuncValue",
                                "Closure": null,
                                "FileName": "tests.gno",
                                "IsMethod": true,
                                "Name": "Modify",
                                "PkgPath": "gno.land/r/demo/tests",
                                "Source": {
                                    "@type": "/gno.RefNode",
                                    "BlockNode": null,
                                    "Location": {
                                        "File": "tests.gno",
                                        "Line": "28",
                                        "Nonce": "0",
                                        "PkgPath": "gno.land/r/demo/tests"
                                    }
                                },
                                "Type": {
                                    "@type": "/gno.FuncType",
                                    "Params": [
                                        {
                                            "Embedded": false,
                                            "Name": "t",
                                            "Tag": "",
                                            "Type": {
                                                "@type": "/gno.PointerType",
                                                "Elt": {
                                                    "@type": "/gno.RefType",
                                                    "ID": "gno.land/r/demo/tests.TestRealmObject"
                                                }
                                            }
                                        }
                                    ],
                                    "Results": []
                                }
                            }
                        }
                    ],
                    "Name": "TestRealmObject",
                    "PkgPath": "gno.land/r/demo/tests"
                }
            }
        },
        {
            "T": {
                "@type": "/gno.TypeType"
            },
            "V": {
                "@type": "/gno.TypeValue",
                "Type": {
                    "@type": "/gno.DeclaredType",
                    "Base": {
                        "@type": "/gno.StructType",
                        "Fields": [
                            {
                                "Embedded": false,
                                "Name": "Name",
                                "Tag": "",
                                "Type": {
                                    "@type": "/gno.PrimitiveType",
                                    "value": "16"
                                }
                            },
                            {
                                "Embedded": false,
                                "Name": "Child",
                                "Tag": "",
                                "Type": {
                                    "@type": "/gno.PointerType",
                                    "Elt": {
                                        "@type": "/gno.RefType",
                                        "ID": "gno.land/r/demo/tests.TestNode"
                                    }
                                }
                            }
                        ],
                        "PkgPath": "gno.land/r/demo/tests"
                    },
                    "Methods": [],
                    "Name": "TestNode",
                    "PkgPath": "gno.land/r/demo/tests"
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [
                    {
                        "Embedded": false,
                        "Name": "str",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.RefType",
                            "ID": "gno.land/r/demo/tests.Stringer"
                        }
                    }
                ],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:3"
                },
                "FileName": "interfaces.gno",
                "IsMethod": false,
                "Name": "AddStringer",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "interfaces.gno",
                        "Line": "13",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [
                        {
                            "Embedded": false,
                            "Name": "str",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.RefType",
                                "ID": "gno.land/r/demo/tests.Stringer"
                            }
                        }
                    ],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [
                    {
                        "Embedded": false,
                        "Name": "path",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.PrimitiveType",
                            "value": "16"
                        }
                    }
                ],
                "Results": [
                    {
                        "Embedded": false,
                        "Name": "",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.PrimitiveType",
                            "value": "16"
                        }
                    }
                ]
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:3"
                },
                "FileName": "interfaces.gno",
                "IsMethod": false,
                "Name": "Render",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "interfaces.gno",
                        "Line": "20",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [
                        {
                            "Embedded": false,
                            "Name": "path",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.PrimitiveType",
                                "value": "16"
                            }
                        }
                    ],
                    "Results": [
                        {
                            "Embedded": false,
                            "Name": "",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.PrimitiveType",
                                "value": "16"
                            }
                        }
                    ]
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": [
                    {
                        "Embedded": false,
                        "Name": "",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.PrimitiveType",
                            "value": "16"
                        }
                    }
                ]
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "CurrentRealmPath",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "5",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": [
                        {
                            "Embedded": false,
                            "Name": "",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.PrimitiveType",
                                "value": "16"
                            }
                        }
                    ]
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "AssertOriginCall",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "9",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": [
                    {
                        "Embedded": false,
                        "Name": "",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.PrimitiveType",
                            "value": "4"
                        }
                    }
                ]
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "IsOriginCall",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "13",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": [
                        {
                            "Embedded": false,
                            "Name": "",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.PrimitiveType",
                                "value": "4"
                            }
                        }
                    ]
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [
                    {
                        "Embedded": false,
                        "Name": "t",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.PointerType",
                            "Elt": {
                                "@type": "/gno.RefType",
                                "ID": "gno.land/r/demo/tests.TestRealmObject"
                            }
                        }
                    }
                ],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "ModifyTestRealmObject",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "24",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [
                        {
                            "Embedded": false,
                            "Name": "t",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.PointerType",
                                "Elt": {
                                    "@type": "/gno.RefType",
                                    "ID": "gno.land/r/demo/tests.TestRealmObject"
                                }
                            }
                        }
                    ],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "InitTestNodes",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "46",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "ModTestNodes",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "51",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "PrintTestNodes",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "59",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.SliceType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests.Stringer"
                },
                "Vrd": false
            },
            "V": {
                "@type": "/gno.SliceValue",
                "Base": {
                    "@type": "/gno.RefValue",
                    "Hash": "5e5535af7afef6f523a897c051944639ef56c057",
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:9"
                },
                "Length": "3",
                "Maxcap": "3",
                "Offset": "0"
            }
        },
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests.TestNode"
                }
            }
        },
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests.TestNode"
                }
            }
        },
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests.TestNode"
                }
            }
        }
    ]
}
d[0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:7]
switchrealm["gno.land/r/demo/tests_foo"]
switchrealm["gno.land/r/demo/tests_foo"]
switchrealm["gno.land/r/demo/tests_foo"]
switchrealm["gno.land/r/demo/tests_foo"]
switchrealm["gno.land/r/demo/tests"]
switchrealm["gno.land/r/demo/tests_test"]

After:

panic: fail on files/zrealm_tests0.gno: diff:
--- Expected
+++ Actual
@@ -223,3 +223,3 @@
                                         "File": "tests.gno",
-                                        "Line": "28",
+                                        "Line": "38",
                                         "Nonce": "0",
@@ -279,3 +279,3 @@
                                         "File": "tests.gno",
-                                        "Line": "28",
+                                        "Line": "38",
                                         "Nonce": "0",
@@ -483,2 +483,90 @@
                 "Params": [],
+                "Results": []
+            },
+            "V": {
+                "@type": "/gno.FuncValue",
+                "Closure": {
+                    "@type": "/gno.RefValue",
+                    "Escaped": true,
+                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
+                },
+                "FileName": "tests.gno",
+                "IsMethod": false,
+                "Name": "IncCounter",
+                "PkgPath": "gno.land/r/demo/tests",
+                "Source": {
+                    "@type": "/gno.RefNode",
+                    "BlockNode": null,
+                    "Location": {
+                        "File": "tests.gno",
+                        "Line": "7",
+                        "Nonce": "0",
+                        "PkgPath": "gno.land/r/demo/tests"
+                    }
+                },
+                "Type": {
+                    "@type": "/gno.FuncType",
+                    "Params": [],
+                    "Results": []
+                }
+            }
+        },
+        {
+            "T": {
+                "@type": "/gno.FuncType",
+                "Params": [],
+                "Results": [
+                    {
+                        "Embedded": false,
+                        "Name": "",
+                        "Tag": "",
+                        "Type": {
+                            "@type": "/gno.PrimitiveType",
+                            "value": "32"
+                        }
+                    }
+                ]
+            },
+            "V": {
+                "@type": "/gno.FuncValue",
+                "Closure": {
+                    "@type": "/gno.RefValue",
+                    "Escaped": true,
+                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
+                },
+                "FileName": "tests.gno",
+                "IsMethod": false,
+                "Name": "Counter",
+                "PkgPath": "gno.land/r/demo/tests",
+                "Source": {
+                    "@type": "/gno.RefNode",
+                    "BlockNode": null,
+                    "Location": {
+                        "File": "tests.gno",
+                        "Line": "11",
+                        "Nonce": "0",
+                        "PkgPath": "gno.land/r/demo/tests"
+                    }
+                },
+                "Type": {
+                    "@type": "/gno.FuncType",
+                    "Params": [],
+                    "Results": [
+                        {
+                            "Embedded": false,
+                            "Name": "",
+                            "Tag": "",
+                            "Type": {
+                                "@type": "/gno.PrimitiveType",
+                                "value": "32"
+                            }
+                        }
+                    ]
+                }
+            }
+        },
+        {
+            "T": {
+                "@type": "/gno.FuncType",
+                "Params": [],
                 "Results": [
@@ -511,3 +599,3 @@
                         "File": "tests.gno",
-                        "Line": "5",
+                        "Line": "15",
                         "Nonce": "0",
@@ -555,3 +643,3 @@
                         "File": "tests.gno",
-                        "Line": "9",
+                        "Line": "19",
                         "Nonce": "0",
@@ -599,3 +687,3 @@
                         "File": "tests.gno",
-                        "Line": "13",
+                        "Line": "23",
                         "Nonce": "0",
@@ -656,3 +744,3 @@
                         "File": "tests.gno",
-                        "Line": "24",
+                        "Line": "34",
                         "Nonce": "0",
@@ -703,3 +791,3 @@
                         "File": "tests.gno",
-                        "Line": "46",
+                        "Line": "56",
                         "Nonce": "0",
@@ -737,3 +825,3 @@
                         "File": "tests.gno",
-                        "Line": "51",
+                        "Line": "61",
                         "Nonce": "0",
@@ -771,3 +859,3 @@
                         "File": "tests.gno",
-                        "Line": "59",
+                        "Line": "69",
                         "Nonce": "0",
@@ -802,2 +890,8 @@
                 "Offset": "0"
+            }
+        },
+        {
+            "T": {
+                "@type": "/gno.PrimitiveType",
+                "value": "32"
             }

@ajnavarro ajnavarro requested a review from a team as a code owner April 25, 2023 09:23
@tbruyelle
Copy link
Contributor

This is an awesome idea :)
But I would keep the complete print first, then the diff, that can be useful to have the full Got or Want.

@ajnavarro
Copy link
Contributor Author

IMHO the diff on tests are not intended to be used as a patch, but to easily see what is the difference between the obtained and expected result. The main problem I had when I was checking the fails on master was that the output was so verbose that was difficult to see what was failing. So I think leaving the output only as the diff is a better way of improving the time needed to fix any problems that these tests might catch in the future.

@tbruyelle
Copy link
Contributor

You have to run go mod tidy, because difflib becomes a direct dependency.

@ilgooz
Copy link
Contributor

ilgooz commented Apr 26, 2023

cc @jeronimoalbi - would this break anything in the parser?

Instead of printing the expected and actual output, create a diff to see
what specifically changed.

Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
@moul
Copy link
Member

moul commented Apr 27, 2023

Hi @ajnavarro, could you please add before/after examples in the PR body for better comprehension of the changes?

Also, there is an alternative workflow that requires running two commands, namely -sync-wanted test and a manual git diff, but it's not utilized in the CI and more complex on a daily basis or for newcomers.

WARN: new dependency.

@ajnavarro
Copy link
Contributor Author

@moul Output examples

Before:

panic: fail on files/zrealm_tests0.gno: got:
switchrealm["gno.land/r/demo/tests"]
c[0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:10]={
    "Fields": [
        {
            "T": {
                "@type": "/gno.PrimitiveType",
                "value": "16"
            },
            "V": {
                "@type": "/gno.StringValue",
                "value": "three"
            }
        }
    ],
    "ObjectInfo": {
        "ID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:10",
        "ModTime": "0",
        "OwnerID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:9",
        "RefCount": "1"
    }
}
c[0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:9]={
    "Data": null,
    "List": [
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests_foo.FooStringer"
                }
            },
            "V": {
                "@type": "/gno.PointerValue",
                "Base": null,
                "Index": "0",
                "TV": {
                    "T": {
                        "@type": "/gno.RefType",
                        "ID": "gno.land/r/demo/tests_foo.FooStringer"
                    },
                    "V": {
                        "@type": "/gno.RefValue",
                        "Hash": "94c14b2efc4bb2f3c24ee42292f161fd1ebd72a3",
                        "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:6"
                    }
                }
            }
        },
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests_foo.FooStringer"
                }
            },
            "V": {
                "@type": "/gno.PointerValue",
                "Base": null,
                "Index": "0",
                "TV": {
                    "T": {
                        "@type": "/gno.RefType",
                        "ID": "gno.land/r/demo/tests_foo.FooStringer"
                    },
                    "V": {
                        "@type": "/gno.RefValue",
                        "Hash": "1e36da78d1dc72e5cbac56c27590332574c89678",
                        "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:8"
                    }
                }
            }
        },
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests_foo.FooStringer"
                }
            },
            "V": {
                "@type": "/gno.PointerValue",
                "Base": null,
                "Index": "0",
                "TV": {
                    "T": {
                        "@type": "/gno.RefType",
                        "ID": "gno.land/r/demo/tests_foo.FooStringer"
                    },
                    "V": {
                        "@type": "/gno.RefValue",
                        "Hash": "43b13870b750f78cda919fa13a5d955d297242bd",
                        "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:10"
                    }
                }
            }
        }
    ],
    "ObjectInfo": {
        "ID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:9",
        "ModTime": "0",
        "OwnerID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:2",
        "RefCount": "1"
    }
}
u[0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:2]={
    "Blank": {},
    "ObjectInfo": {
        "ID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:2",
        "IsEscaped": true,
        "ModTime": "8",
        "RefCount": "3"
    },
    "Parent": null,
    "Source": {
        "@type": "/gno.RefNode",
        "BlockNode": null,
        "Location": {
            "File": "",
            "Line": "0",
            "Nonce": "0",
            "PkgPath": "gno.land/r/demo/tests"
        }
    },
    "Values": [
        {
            "T": {
                "@type": "/gno.TypeType"
            },
            "V": {
                "@type": "/gno.TypeValue",
                "Type": {
                    "@type": "/gno.DeclaredType",
                    "Base": {
                        "@type": "/gno.InterfaceType",
                        "Generic": "",
                        "Methods": [
                            {
                                "Embedded": false,
                                "Name": "String",
                                "Tag": "",
                                "Type": {
                                    "@type": "/gno.FuncType",
                                    "Params": [],
                                    "Results": [
                                        {
                                            "Embedded": false,
                                            "Name": "",
                                            "Tag": "",
                                            "Type": {
                                                "@type": "/gno.PrimitiveType",
                                                "value": "16"
                                            }
                                        }
                                    ]
                                }
                            }
                        ],
                        "PkgPath": "gno.land/r/demo/tests"
                    },
                    "Methods": [],
                    "Name": "Stringer",
                    "PkgPath": "gno.land/r/demo/tests"
                }
            }
        },
        {
            "T": {
                "@type": "/gno.TypeType"
            },
            "V": {
                "@type": "/gno.TypeValue",
                "Type": {
                    "@type": "/gno.DeclaredType",
                    "Base": {
                        "@type": "/gno.StructType",
                        "Fields": [
                            {
                                "Embedded": false,
                                "Name": "Field",
                                "Tag": "",
                                "Type": {
                                    "@type": "/gno.PrimitiveType",
                                    "value": "16"
                                }
                            }
                        ],
                        "PkgPath": "gno.land/r/demo/tests"
                    },
                    "Methods": [
                        {
                            "T": {
                                "@type": "/gno.FuncType",
                                "Params": [
                                    {
                                        "Embedded": false,
                                        "Name": "t",
                                        "Tag": "",
                                        "Type": {
                                            "@type": "/gno.PointerType",
                                            "Elt": {
                                                "@type": "/gno.RefType",
                                                "ID": "gno.land/r/demo/tests.TestRealmObject"
                                            }
                                        }
                                    }
                                ],
                                "Results": []
                            },
                            "V": {
                                "@type": "/gno.FuncValue",
                                "Closure": null,
                                "FileName": "tests.gno",
                                "IsMethod": true,
                                "Name": "Modify",
                                "PkgPath": "gno.land/r/demo/tests",
                                "Source": {
                                    "@type": "/gno.RefNode",
                                    "BlockNode": null,
                                    "Location": {
                                        "File": "tests.gno",
                                        "Line": "38",
                                        "Nonce": "0",
                                        "PkgPath": "gno.land/r/demo/tests"
                                    }
                                },
                                "Type": {
                                    "@type": "/gno.FuncType",
                                    "Params": [
                                        {
                                            "Embedded": false,
                                            "Name": "t",
                                            "Tag": "",
                                            "Type": {
                                                "@type": "/gno.PointerType",
                                                "Elt": {
                                                    "@type": "/gno.RefType",
                                                    "ID": "gno.land/r/demo/tests.TestRealmObject"
                                                }
                                            }
                                        }
                                    ],
                                    "Results": []
                                }
                            }
                        },
                        {
                            "T": {
                                "@type": "/gno.FuncType",
                                "Params": [
                                    {
                                        "Embedded": false,
                                        "Name": "t",
                                        "Tag": "",
                                        "Type": {
                                            "@type": "/gno.PointerType",
                                            "Elt": {
                                                "@type": "/gno.RefType",
                                                "ID": "gno.land/r/demo/tests.TestRealmObject"
                                            }
                                        }
                                    }
                                ],
                                "Results": []
                            },
                            "V": {
                                "@type": "/gno.FuncValue",
                                "Closure": null,
                                "FileName": "tests.gno",
                                "IsMethod": true,
                                "Name": "Modify",
                                "PkgPath": "gno.land/r/demo/tests",
                                "Source": {
                                    "@type": "/gno.RefNode",
                                    "BlockNode": null,
                                    "Location": {
                                        "File": "tests.gno",
                                        "Line": "38",
                                        "Nonce": "0",
                                        "PkgPath": "gno.land/r/demo/tests"
                                    }
                                },
                                "Type": {
                                    "@type": "/gno.FuncType",
                                    "Params": [
                                        {
                                            "Embedded": false,
                                            "Name": "t",
                                            "Tag": "",
                                            "Type": {
                                                "@type": "/gno.PointerType",
                                                "Elt": {
                                                    "@type": "/gno.RefType",
                                                    "ID": "gno.land/r/demo/tests.TestRealmObject"
                                                }
                                            }
                                        }
                                    ],
                                    "Results": []
                                }
                            }
                        }
                    ],
                    "Name": "TestRealmObject",
                    "PkgPath": "gno.land/r/demo/tests"
                }
            }
        },
        {
            "T": {
                "@type": "/gno.TypeType"
            },
            "V": {
                "@type": "/gno.TypeValue",
                "Type": {
                    "@type": "/gno.DeclaredType",
                    "Base": {
                        "@type": "/gno.StructType",
                        "Fields": [
                            {
                                "Embedded": false,
                                "Name": "Name",
                                "Tag": "",
                                "Type": {
                                    "@type": "/gno.PrimitiveType",
                                    "value": "16"
                                }
                            },
                            {
                                "Embedded": false,
                                "Name": "Child",
                                "Tag": "",
                                "Type": {
                                    "@type": "/gno.PointerType",
                                    "Elt": {
                                        "@type": "/gno.RefType",
                                        "ID": "gno.land/r/demo/tests.TestNode"
                                    }
                                }
                            }
                        ],
                        "PkgPath": "gno.land/r/demo/tests"
                    },
                    "Methods": [],
                    "Name": "TestNode",
                    "PkgPath": "gno.land/r/demo/tests"
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [
                    {
                        "Embedded": false,
                        "Name": "str",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.RefType",
                            "ID": "gno.land/r/demo/tests.Stringer"
                        }
                    }
                ],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:3"
                },
                "FileName": "interfaces.gno",
                "IsMethod": false,
                "Name": "AddStringer",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "interfaces.gno",
                        "Line": "13",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [
                        {
                            "Embedded": false,
                            "Name": "str",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.RefType",
                                "ID": "gno.land/r/demo/tests.Stringer"
                            }
                        }
                    ],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [
                    {
                        "Embedded": false,
                        "Name": "path",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.PrimitiveType",
                            "value": "16"
                        }
                    }
                ],
                "Results": [
                    {
                        "Embedded": false,
                        "Name": "",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.PrimitiveType",
                            "value": "16"
                        }
                    }
                ]
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:3"
                },
                "FileName": "interfaces.gno",
                "IsMethod": false,
                "Name": "Render",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "interfaces.gno",
                        "Line": "20",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [
                        {
                            "Embedded": false,
                            "Name": "path",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.PrimitiveType",
                                "value": "16"
                            }
                        }
                    ],
                    "Results": [
                        {
                            "Embedded": false,
                            "Name": "",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.PrimitiveType",
                                "value": "16"
                            }
                        }
                    ]
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "IncCounter",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "7",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": [
                    {
                        "Embedded": false,
                        "Name": "",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.PrimitiveType",
                            "value": "32"
                        }
                    }
                ]
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "Counter",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "11",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": [
                        {
                            "Embedded": false,
                            "Name": "",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.PrimitiveType",
                                "value": "32"
                            }
                        }
                    ]
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": [
                    {
                        "Embedded": false,
                        "Name": "",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.PrimitiveType",
                            "value": "16"
                        }
                    }
                ]
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "CurrentRealmPath",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "15",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": [
                        {
                            "Embedded": false,
                            "Name": "",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.PrimitiveType",
                                "value": "16"
                            }
                        }
                    ]
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "AssertOriginCall",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "19",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": [
                    {
                        "Embedded": false,
                        "Name": "",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.PrimitiveType",
                            "value": "4"
                        }
                    }
                ]
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "IsOriginCall",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "23",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": [
                        {
                            "Embedded": false,
                            "Name": "",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.PrimitiveType",
                                "value": "4"
                            }
                        }
                    ]
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [
                    {
                        "Embedded": false,
                        "Name": "t",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.PointerType",
                            "Elt": {
                                "@type": "/gno.RefType",
                                "ID": "gno.land/r/demo/tests.TestRealmObject"
                            }
                        }
                    }
                ],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "ModifyTestRealmObject",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "34",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [
                        {
                            "Embedded": false,
                            "Name": "t",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.PointerType",
                                "Elt": {
                                    "@type": "/gno.RefType",
                                    "ID": "gno.land/r/demo/tests.TestRealmObject"
                                }
                            }
                        }
                    ],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "InitTestNodes",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "56",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "ModTestNodes",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "61",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "PrintTestNodes",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "69",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.SliceType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests.Stringer"
                },
                "Vrd": false
            },
            "V": {
                "@type": "/gno.SliceValue",
                "Base": {
                    "@type": "/gno.RefValue",
                    "Hash": "5e5535af7afef6f523a897c051944639ef56c057",
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:9"
                },
                "Length": "3",
                "Maxcap": "3",
                "Offset": "0"
            }
        },
        {
            "T": {
                "@type": "/gno.PrimitiveType",
                "value": "32"
            }
        },
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests.TestNode"
                }
            }
        },
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests.TestNode"
                }
            }
        },
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests.TestNode"
                }
            }
        }
    ]
}
d[0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:7]
switchrealm["gno.land/r/demo/tests_foo"]
switchrealm["gno.land/r/demo/tests_foo"]
switchrealm["gno.land/r/demo/tests_foo"]
switchrealm["gno.land/r/demo/tests_foo"]
switchrealm["gno.land/r/demo/tests"]
switchrealm["gno.land/r/demo/tests_test"]

want:
switchrealm["gno.land/r/demo/tests"]
c[0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:10]={
    "Fields": [
        {
            "T": {
                "@type": "/gno.PrimitiveType",
                "value": "16"
            },
            "V": {
                "@type": "/gno.StringValue",
                "value": "three"
            }
        }
    ],
    "ObjectInfo": {
        "ID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:10",
        "ModTime": "0",
        "OwnerID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:9",
        "RefCount": "1"
    }
}
c[0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:9]={
    "Data": null,
    "List": [
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests_foo.FooStringer"
                }
            },
            "V": {
                "@type": "/gno.PointerValue",
                "Base": null,
                "Index": "0",
                "TV": {
                    "T": {
                        "@type": "/gno.RefType",
                        "ID": "gno.land/r/demo/tests_foo.FooStringer"
                    },
                    "V": {
                        "@type": "/gno.RefValue",
                        "Hash": "94c14b2efc4bb2f3c24ee42292f161fd1ebd72a3",
                        "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:6"
                    }
                }
            }
        },
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests_foo.FooStringer"
                }
            },
            "V": {
                "@type": "/gno.PointerValue",
                "Base": null,
                "Index": "0",
                "TV": {
                    "T": {
                        "@type": "/gno.RefType",
                        "ID": "gno.land/r/demo/tests_foo.FooStringer"
                    },
                    "V": {
                        "@type": "/gno.RefValue",
                        "Hash": "1e36da78d1dc72e5cbac56c27590332574c89678",
                        "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:8"
                    }
                }
            }
        },
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests_foo.FooStringer"
                }
            },
            "V": {
                "@type": "/gno.PointerValue",
                "Base": null,
                "Index": "0",
                "TV": {
                    "T": {
                        "@type": "/gno.RefType",
                        "ID": "gno.land/r/demo/tests_foo.FooStringer"
                    },
                    "V": {
                        "@type": "/gno.RefValue",
                        "Hash": "43b13870b750f78cda919fa13a5d955d297242bd",
                        "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:10"
                    }
                }
            }
        }
    ],
    "ObjectInfo": {
        "ID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:9",
        "ModTime": "0",
        "OwnerID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:2",
        "RefCount": "1"
    }
}
u[0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:2]={
    "Blank": {},
    "ObjectInfo": {
        "ID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:2",
        "IsEscaped": true,
        "ModTime": "8",
        "RefCount": "3"
    },
    "Parent": null,
    "Source": {
        "@type": "/gno.RefNode",
        "BlockNode": null,
        "Location": {
            "File": "",
            "Line": "0",
            "Nonce": "0",
            "PkgPath": "gno.land/r/demo/tests"
        }
    },
    "Values": [
        {
            "T": {
                "@type": "/gno.TypeType"
            },
            "V": {
                "@type": "/gno.TypeValue",
                "Type": {
                    "@type": "/gno.DeclaredType",
                    "Base": {
                        "@type": "/gno.InterfaceType",
                        "Generic": "",
                        "Methods": [
                            {
                                "Embedded": false,
                                "Name": "String",
                                "Tag": "",
                                "Type": {
                                    "@type": "/gno.FuncType",
                                    "Params": [],
                                    "Results": [
                                        {
                                            "Embedded": false,
                                            "Name": "",
                                            "Tag": "",
                                            "Type": {
                                                "@type": "/gno.PrimitiveType",
                                                "value": "16"
                                            }
                                        }
                                    ]
                                }
                            }
                        ],
                        "PkgPath": "gno.land/r/demo/tests"
                    },
                    "Methods": [],
                    "Name": "Stringer",
                    "PkgPath": "gno.land/r/demo/tests"
                }
            }
        },
        {
            "T": {
                "@type": "/gno.TypeType"
            },
            "V": {
                "@type": "/gno.TypeValue",
                "Type": {
                    "@type": "/gno.DeclaredType",
                    "Base": {
                        "@type": "/gno.StructType",
                        "Fields": [
                            {
                                "Embedded": false,
                                "Name": "Field",
                                "Tag": "",
                                "Type": {
                                    "@type": "/gno.PrimitiveType",
                                    "value": "16"
                                }
                            }
                        ],
                        "PkgPath": "gno.land/r/demo/tests"
                    },
                    "Methods": [
                        {
                            "T": {
                                "@type": "/gno.FuncType",
                                "Params": [
                                    {
                                        "Embedded": false,
                                        "Name": "t",
                                        "Tag": "",
                                        "Type": {
                                            "@type": "/gno.PointerType",
                                            "Elt": {
                                                "@type": "/gno.RefType",
                                                "ID": "gno.land/r/demo/tests.TestRealmObject"
                                            }
                                        }
                                    }
                                ],
                                "Results": []
                            },
                            "V": {
                                "@type": "/gno.FuncValue",
                                "Closure": null,
                                "FileName": "tests.gno",
                                "IsMethod": true,
                                "Name": "Modify",
                                "PkgPath": "gno.land/r/demo/tests",
                                "Source": {
                                    "@type": "/gno.RefNode",
                                    "BlockNode": null,
                                    "Location": {
                                        "File": "tests.gno",
                                        "Line": "28",
                                        "Nonce": "0",
                                        "PkgPath": "gno.land/r/demo/tests"
                                    }
                                },
                                "Type": {
                                    "@type": "/gno.FuncType",
                                    "Params": [
                                        {
                                            "Embedded": false,
                                            "Name": "t",
                                            "Tag": "",
                                            "Type": {
                                                "@type": "/gno.PointerType",
                                                "Elt": {
                                                    "@type": "/gno.RefType",
                                                    "ID": "gno.land/r/demo/tests.TestRealmObject"
                                                }
                                            }
                                        }
                                    ],
                                    "Results": []
                                }
                            }
                        },
                        {
                            "T": {
                                "@type": "/gno.FuncType",
                                "Params": [
                                    {
                                        "Embedded": false,
                                        "Name": "t",
                                        "Tag": "",
                                        "Type": {
                                            "@type": "/gno.PointerType",
                                            "Elt": {
                                                "@type": "/gno.RefType",
                                                "ID": "gno.land/r/demo/tests.TestRealmObject"
                                            }
                                        }
                                    }
                                ],
                                "Results": []
                            },
                            "V": {
                                "@type": "/gno.FuncValue",
                                "Closure": null,
                                "FileName": "tests.gno",
                                "IsMethod": true,
                                "Name": "Modify",
                                "PkgPath": "gno.land/r/demo/tests",
                                "Source": {
                                    "@type": "/gno.RefNode",
                                    "BlockNode": null,
                                    "Location": {
                                        "File": "tests.gno",
                                        "Line": "28",
                                        "Nonce": "0",
                                        "PkgPath": "gno.land/r/demo/tests"
                                    }
                                },
                                "Type": {
                                    "@type": "/gno.FuncType",
                                    "Params": [
                                        {
                                            "Embedded": false,
                                            "Name": "t",
                                            "Tag": "",
                                            "Type": {
                                                "@type": "/gno.PointerType",
                                                "Elt": {
                                                    "@type": "/gno.RefType",
                                                    "ID": "gno.land/r/demo/tests.TestRealmObject"
                                                }
                                            }
                                        }
                                    ],
                                    "Results": []
                                }
                            }
                        }
                    ],
                    "Name": "TestRealmObject",
                    "PkgPath": "gno.land/r/demo/tests"
                }
            }
        },
        {
            "T": {
                "@type": "/gno.TypeType"
            },
            "V": {
                "@type": "/gno.TypeValue",
                "Type": {
                    "@type": "/gno.DeclaredType",
                    "Base": {
                        "@type": "/gno.StructType",
                        "Fields": [
                            {
                                "Embedded": false,
                                "Name": "Name",
                                "Tag": "",
                                "Type": {
                                    "@type": "/gno.PrimitiveType",
                                    "value": "16"
                                }
                            },
                            {
                                "Embedded": false,
                                "Name": "Child",
                                "Tag": "",
                                "Type": {
                                    "@type": "/gno.PointerType",
                                    "Elt": {
                                        "@type": "/gno.RefType",
                                        "ID": "gno.land/r/demo/tests.TestNode"
                                    }
                                }
                            }
                        ],
                        "PkgPath": "gno.land/r/demo/tests"
                    },
                    "Methods": [],
                    "Name": "TestNode",
                    "PkgPath": "gno.land/r/demo/tests"
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [
                    {
                        "Embedded": false,
                        "Name": "str",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.RefType",
                            "ID": "gno.land/r/demo/tests.Stringer"
                        }
                    }
                ],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:3"
                },
                "FileName": "interfaces.gno",
                "IsMethod": false,
                "Name": "AddStringer",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "interfaces.gno",
                        "Line": "13",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [
                        {
                            "Embedded": false,
                            "Name": "str",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.RefType",
                                "ID": "gno.land/r/demo/tests.Stringer"
                            }
                        }
                    ],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [
                    {
                        "Embedded": false,
                        "Name": "path",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.PrimitiveType",
                            "value": "16"
                        }
                    }
                ],
                "Results": [
                    {
                        "Embedded": false,
                        "Name": "",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.PrimitiveType",
                            "value": "16"
                        }
                    }
                ]
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:3"
                },
                "FileName": "interfaces.gno",
                "IsMethod": false,
                "Name": "Render",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "interfaces.gno",
                        "Line": "20",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [
                        {
                            "Embedded": false,
                            "Name": "path",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.PrimitiveType",
                                "value": "16"
                            }
                        }
                    ],
                    "Results": [
                        {
                            "Embedded": false,
                            "Name": "",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.PrimitiveType",
                                "value": "16"
                            }
                        }
                    ]
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": [
                    {
                        "Embedded": false,
                        "Name": "",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.PrimitiveType",
                            "value": "16"
                        }
                    }
                ]
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "CurrentRealmPath",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "5",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": [
                        {
                            "Embedded": false,
                            "Name": "",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.PrimitiveType",
                                "value": "16"
                            }
                        }
                    ]
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "AssertOriginCall",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "9",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": [
                    {
                        "Embedded": false,
                        "Name": "",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.PrimitiveType",
                            "value": "4"
                        }
                    }
                ]
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "IsOriginCall",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "13",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": [
                        {
                            "Embedded": false,
                            "Name": "",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.PrimitiveType",
                                "value": "4"
                            }
                        }
                    ]
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [
                    {
                        "Embedded": false,
                        "Name": "t",
                        "Tag": "",
                        "Type": {
                            "@type": "/gno.PointerType",
                            "Elt": {
                                "@type": "/gno.RefType",
                                "ID": "gno.land/r/demo/tests.TestRealmObject"
                            }
                        }
                    }
                ],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "ModifyTestRealmObject",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "24",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [
                        {
                            "Embedded": false,
                            "Name": "t",
                            "Tag": "",
                            "Type": {
                                "@type": "/gno.PointerType",
                                "Elt": {
                                    "@type": "/gno.RefType",
                                    "ID": "gno.land/r/demo/tests.TestRealmObject"
                                }
                            }
                        }
                    ],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "InitTestNodes",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "46",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "ModTestNodes",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "51",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.FuncType",
                "Params": [],
                "Results": []
            },
            "V": {
                "@type": "/gno.FuncValue",
                "Closure": {
                    "@type": "/gno.RefValue",
                    "Escaped": true,
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
                },
                "FileName": "tests.gno",
                "IsMethod": false,
                "Name": "PrintTestNodes",
                "PkgPath": "gno.land/r/demo/tests",
                "Source": {
                    "@type": "/gno.RefNode",
                    "BlockNode": null,
                    "Location": {
                        "File": "tests.gno",
                        "Line": "59",
                        "Nonce": "0",
                        "PkgPath": "gno.land/r/demo/tests"
                    }
                },
                "Type": {
                    "@type": "/gno.FuncType",
                    "Params": [],
                    "Results": []
                }
            }
        },
        {
            "T": {
                "@type": "/gno.SliceType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests.Stringer"
                },
                "Vrd": false
            },
            "V": {
                "@type": "/gno.SliceValue",
                "Base": {
                    "@type": "/gno.RefValue",
                    "Hash": "5e5535af7afef6f523a897c051944639ef56c057",
                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:9"
                },
                "Length": "3",
                "Maxcap": "3",
                "Offset": "0"
            }
        },
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests.TestNode"
                }
            }
        },
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests.TestNode"
                }
            }
        },
        {
            "T": {
                "@type": "/gno.PointerType",
                "Elt": {
                    "@type": "/gno.RefType",
                    "ID": "gno.land/r/demo/tests.TestNode"
                }
            }
        }
    ]
}
d[0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:7]
switchrealm["gno.land/r/demo/tests_foo"]
switchrealm["gno.land/r/demo/tests_foo"]
switchrealm["gno.land/r/demo/tests_foo"]
switchrealm["gno.land/r/demo/tests_foo"]
switchrealm["gno.land/r/demo/tests"]
switchrealm["gno.land/r/demo/tests_test"]

After:

panic: fail on files/zrealm_tests0.gno: diff:
--- Expected
+++ Actual
@@ -223,3 +223,3 @@
                                         "File": "tests.gno",
-                                        "Line": "28",
+                                        "Line": "38",
                                         "Nonce": "0",
@@ -279,3 +279,3 @@
                                         "File": "tests.gno",
-                                        "Line": "28",
+                                        "Line": "38",
                                         "Nonce": "0",
@@ -483,2 +483,90 @@
                 "Params": [],
+                "Results": []
+            },
+            "V": {
+                "@type": "/gno.FuncValue",
+                "Closure": {
+                    "@type": "/gno.RefValue",
+                    "Escaped": true,
+                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
+                },
+                "FileName": "tests.gno",
+                "IsMethod": false,
+                "Name": "IncCounter",
+                "PkgPath": "gno.land/r/demo/tests",
+                "Source": {
+                    "@type": "/gno.RefNode",
+                    "BlockNode": null,
+                    "Location": {
+                        "File": "tests.gno",
+                        "Line": "7",
+                        "Nonce": "0",
+                        "PkgPath": "gno.land/r/demo/tests"
+                    }
+                },
+                "Type": {
+                    "@type": "/gno.FuncType",
+                    "Params": [],
+                    "Results": []
+                }
+            }
+        },
+        {
+            "T": {
+                "@type": "/gno.FuncType",
+                "Params": [],
+                "Results": [
+                    {
+                        "Embedded": false,
+                        "Name": "",
+                        "Tag": "",
+                        "Type": {
+                            "@type": "/gno.PrimitiveType",
+                            "value": "32"
+                        }
+                    }
+                ]
+            },
+            "V": {
+                "@type": "/gno.FuncValue",
+                "Closure": {
+                    "@type": "/gno.RefValue",
+                    "Escaped": true,
+                    "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
+                },
+                "FileName": "tests.gno",
+                "IsMethod": false,
+                "Name": "Counter",
+                "PkgPath": "gno.land/r/demo/tests",
+                "Source": {
+                    "@type": "/gno.RefNode",
+                    "BlockNode": null,
+                    "Location": {
+                        "File": "tests.gno",
+                        "Line": "11",
+                        "Nonce": "0",
+                        "PkgPath": "gno.land/r/demo/tests"
+                    }
+                },
+                "Type": {
+                    "@type": "/gno.FuncType",
+                    "Params": [],
+                    "Results": [
+                        {
+                            "Embedded": false,
+                            "Name": "",
+                            "Tag": "",
+                            "Type": {
+                                "@type": "/gno.PrimitiveType",
+                                "value": "32"
+                            }
+                        }
+                    ]
+                }
+            }
+        },
+        {
+            "T": {
+                "@type": "/gno.FuncType",
+                "Params": [],
                 "Results": [
@@ -511,3 +599,3 @@
                         "File": "tests.gno",
-                        "Line": "5",
+                        "Line": "15",
                         "Nonce": "0",
@@ -555,3 +643,3 @@
                         "File": "tests.gno",
-                        "Line": "9",
+                        "Line": "19",
                         "Nonce": "0",
@@ -599,3 +687,3 @@
                         "File": "tests.gno",
-                        "Line": "13",
+                        "Line": "23",
                         "Nonce": "0",
@@ -656,3 +744,3 @@
                         "File": "tests.gno",
-                        "Line": "24",
+                        "Line": "34",
                         "Nonce": "0",
@@ -703,3 +791,3 @@
                         "File": "tests.gno",
-                        "Line": "46",
+                        "Line": "56",
                         "Nonce": "0",
@@ -737,3 +825,3 @@
                         "File": "tests.gno",
-                        "Line": "51",
+                        "Line": "61",
                         "Nonce": "0",
@@ -771,3 +859,3 @@
                         "File": "tests.gno",
-                        "Line": "59",
+                        "Line": "69",
                         "Nonce": "0",
@@ -802,2 +890,8 @@
                 "Offset": "0"
+            }
+        },
+        {
+            "T": {
+                "@type": "/gno.PrimitiveType",
+                "value": "32"
             }

@tbruyelle
Copy link
Contributor

Hi @ajnavarro, could you please add before/after examples in the PR body for better comprehension of the changes?

Also, there is an alternative workflow that requires running two commands, namely -sync-wanted test and a manual git diff, but it's not utilized in the CI and more complex on a daily basis or for newcomers.

I think the flag you mention is called -update-golden-tests, not -sync-wanted, and it doesn't require git diff. If set, instead of comparing the real and expected output, it just replaces the expected with real. As far as I can tell this flag isn't affected by this change.

WARN: new dependency.

It was an indirect dependency, because this is what testify uses under the hood. Does this reduce the warning level 👼 ?

@ajnavarro
Copy link
Contributor Author

It was an indirect dependency, because this is what testify uses under the hood. Does this reduce the warning level angel ?

Right

Copy link
Member

@zivkovicmilos zivkovicmilos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has got to be the longest PR description we've had to date 🙂

The diff view is much cleaner 💯

@moul are we fine with adding this external dependency?

@zivkovicmilos zivkovicmilos requested a review from moul May 15, 2023 13:25
@ajnavarro
Copy link
Contributor Author

@zivkovicmilos the dependency was already there. I'm using the same library that Testify uses under the hood for diff assertions.

Copy link
Member

@thehowl thehowl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this 👍

Maybe a compromise with what @tbruyelle was also saying is to make it so that, when writing out the diff, all the context lines are printed (not just the different ones)? If difflib doesn't support this directly ie by setting context to -1, we could make Context something like 1 << 31...

@moul
Copy link
Member

moul commented May 18, 2023

@moul are we fine with adding this external dependency?

This dependency only affects the advanced developer tools and not runtime. It offers flexibility and goes in the right direction. We can create multiple go.mod files to keep core libraries minimal. Reverting is also easy if needed. Let's go for it! 👍

Edit: maybe we'll want to add a toggle to get the previous behavior.

@ajnavarro ajnavarro merged commit 7cfa7ae into gnolang:master May 18, 2023
@ajnavarro ajnavarro deleted the fix/improve-vm-file-tests branch May 18, 2023 08:01
moul-bot pushed a commit that referenced this pull request May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

6 participants