From ae04743ced1e272a5fdbc26e5777f697a050be1d Mon Sep 17 00:00:00 2001 From: "Jeff (Zhefu) Jiang" Date: Mon, 20 Jul 2015 13:44:03 -0700 Subject: [PATCH] Fix test printings --- go/vt/callerid/testsuite.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/go/vt/callerid/testsuite.go b/go/vt/callerid/testsuite.go index 64e2beda9c..3d9ded8c7c 100644 --- a/go/vt/callerid/testsuite.go +++ b/go/vt/callerid/testsuite.go @@ -49,16 +49,16 @@ func Tests(t *testing.T, im *qrpb.VTGateCallerID, ef *vtpb.CallerID) { // Test GetXxx on nil receivers, should get all empty strings if u := GetUsername(ctxim); u != "" { - t.Errorf("Expect empty string from (nil).GetUsername(), but got %v", u) + t.Errorf("Expect empty string from GetUsername(nil), but got %v", u) } if p := GetPrincipal(ctxef); p != "" { - t.Errorf("Expect empty string from (nil).GetPrincipal(), but got %v", p) + t.Errorf("Expect empty string from GetPrincipal(nil), but got %v", p) } if c := GetComponent(ctxef); c != "" { - t.Errorf("Expect empty string from (nil).GetComponent(), but got %v", c) + t.Errorf("Expect empty string from GetComponent(nil), but got %v", c) } if s := GetSubcomponent(ctxef); s != "" { - t.Errorf("Expect empty string from (nil).GetSubcomponent(), but got %v", s) + t.Errorf("Expect empty string from GetSubcomponent(nil), but got %v", s) } ctx = NewContext(ctx, ef, im) @@ -68,7 +68,7 @@ func Tests(t *testing.T, im *qrpb.VTGateCallerID, ef *vtpb.CallerID) { t.Errorf("Expect %v from ImmediateCallerIDFromContext, but got %v", im, ctxim) } if u := GetUsername(im); u != FakeUsername { - t.Errorf("Expect %v from im.Username(), but got %v", FakeUsername, u) + t.Errorf("Expect %v from GetUsername(im), but got %v", FakeUsername, u) } ctxef = EffectiveCallerIDFromContext(ctx) @@ -77,12 +77,12 @@ func Tests(t *testing.T, im *qrpb.VTGateCallerID, ef *vtpb.CallerID) { t.Errorf("Expect %v from EffectiveCallerIDFromContext, but got %v", ef, ctxef) } if p := GetPrincipal(ef); p != FakePrincipal { - t.Errorf("Expect %v from ef.Principal(), but got %v", FakePrincipal, p) + t.Errorf("Expect %v from GetPrincipal(ef), but got %v", FakePrincipal, p) } if c := GetComponent(ef); c != FakeComponent { - t.Errorf("Expect %v from ef.Component(), but got %v", FakeComponent, c) + t.Errorf("Expect %v from GetComponent(ef), but got %v", FakeComponent, c) } if s := GetSubcomponent(ef); s != FakeSubcomponent { - t.Errorf("Expect %v from ef.Subcomponent(), but got %v", FakeSubcomponent, s) + t.Errorf("Expect %v from GetSubcomponent(ef), but got %v", FakeSubcomponent, s) } }