Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Unified Diff: go/src/infra/gae/libs/gae/helper/datastore_key_test.go

Issue 1238573004: Add NewDSKeyFromEncoded convenience function. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@lazy_multi_error
Patch Set: reparent off of dependency Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | go/src/infra/gae/libs/gae/helper/datastore_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: go/src/infra/gae/libs/gae/helper/datastore_key_test.go
diff --git a/go/src/infra/gae/libs/gae/helper/datastore_key_test.go b/go/src/infra/gae/libs/gae/helper/datastore_key_test.go
index 81b131316a1daa051a098b6f06dd53934fb2eda9..ece71b7773f16e6da23a2ad62e49b15da5375c32 100644
--- a/go/src/infra/gae/libs/gae/helper/datastore_key_test.go
+++ b/go/src/infra/gae/libs/gae/helper/datastore_key_test.go
@@ -62,6 +62,11 @@ func TestKeyEncode(t *testing.T) {
dec := NewDSKeyToks(aid, ns, toks)
So(dec, ShouldNotBeNil)
So(dec, ShouldEqualKey, k)
+
+ dec2, err := NewDSKeyFromEncoded(enc)
+ So(err, ShouldBeNil)
+ So(dec2, ShouldEqualKey, dec)
+ So(dec2, ShouldEqualKey, k)
})
Convey(k.String()+" (json)", func() {
« no previous file with comments | « no previous file | go/src/infra/gae/libs/gae/helper/datastore_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698