MCPcopy Index your code
hub / github.com/bitfield/script / TestDecodeBase64_CorrectlyDecodes

Function TestDecodeBase64_CorrectlyDecodes

script_test.go:1999–2013  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1997}
1998
1999func TestDecodeBase64_CorrectlyDecodes(t *testing.T) {
2000 t.Parallel()
2001 for _, tc := range base64Cases {
2002 t.Run(tc.name, func(t *testing.T) {
2003 got, err := script.Echo(tc.encoded).DecodeBase64().String()
2004 if err != nil {
2005 t.Fatal(err)
2006 }
2007 if got != tc.decoded {
2008 t.Logf("input %q incorrectly decoded:", tc.encoded)
2009 t.Error(cmp.Diff(tc.decoded, got))
2010 }
2011 })
2012 }
2013}
2014
2015func TestEncodeBase64_FollowedByDecodeRecoversOriginal(t *testing.T) {
2016 t.Parallel()

Callers

nothing calls this directly

Calls 4

EchoFunction · 0.92
StringMethod · 0.80
DecodeBase64Method · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…