diff --git a/examples/gno.land/r/profile/profiles.gno b/examples/gno.land/r/profile/profiles.gno index e1b2a1877a11..27ef93e2e483 100644 --- a/examples/gno.land/r/profile/profiles.gno +++ b/examples/gno.land/r/profile/profiles.gno @@ -14,7 +14,7 @@ import ( var profiles *avl.MutTree // std.Address.String() -> *Profile func init() { - // profiles = avl.NewMutTree() + profiles = avl.NewMutTree() } func Update(dict map[string]interface{}) { diff --git a/examples/gno.land/r/profile/profiles_test.gno b/examples/gno.land/r/profile/profiles_test.gno index 6792a250c757..a6def8497237 100644 --- a/examples/gno.land/r/profile/profiles_test.gno +++ b/examples/gno.land/r/profile/profiles_test.gno @@ -8,9 +8,24 @@ import ( ) func TestRender(t *testing.T) { - got := profile.Render("") - fmt.Println(got) - //_ = profile.Render + testCases := []struct { + path string + expected string + }{ + {"", "stats: 0 known profiles\n"}, + } + + for _, tc := range testCases { + //t.Run(tc.path, func(t *testing.T) { + got := profile.Render(tc.path) + if tc.expected != got { + t.Errorf("expected %q, got %q", tc.expected, got) + } + //}) + } +} + +func TestSetReadProfile(t *testing.T) { // various data types // avatar // ip address