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

Unified Diff: service/datastore/pls_test.go

Issue 2048933004: Refactor multiarg, split MGS/PLS. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/gae@master
Patch Set: Rebarse? Created 4 years, 6 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 | « service/datastore/pls_impl.go ('k') | service/datastore/reflect.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/pls_test.go
diff --git a/service/datastore/pls_test.go b/service/datastore/pls_test.go
index c997765ff5c96a58ff26f6f0fb8a1de304c6e348..50480f1be474143565f0efa0e7d079415ec66c59 100644
--- a/service/datastore/pls_test.go
+++ b/service/datastore/pls_test.go
@@ -1813,10 +1813,17 @@ func TestMeta(t *testing.T) {
})
Convey("attempting to get a PLS for a non *struct is an error", func() {
- So(func() { GetPLS((*[]string)(nil)) }, ShouldPanicLike,
+ s := []string{}
+ So(func() { GetPLS(&s) }, ShouldPanicLike,
"cannot GetPLS(*[]string): not a pointer-to-struct")
})
+ Convey("attempting to get a PLS for a nil pointer-to-struct is an error", func() {
+ var s *Simple
+ So(func() { GetPLS(s) }, ShouldPanicLike,
+ "cannot GetPLS(*datastore.Simple): pointer is nil")
+ })
+
Convey("convertible meta default types", func() {
type OKDefaults struct {
When string `gae:"$when,tomorrow"`
« no previous file with comments | « service/datastore/pls_impl.go ('k') | service/datastore/reflect.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698