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

Side by Side Diff: service/datastore/pls_test.go

Issue 1616033004: Add a test to ensure []byte => BlobKey PLS works. (Closed) Base URL: https://github.com/luci/gae@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // adapted from github.com/golang/appengine/datastore 5 // adapted from github.com/golang/appengine/datastore
6 6
7 package datastore 7 package datastore
8 8
9 import ( 9 import (
10 "bytes" 10 "bytes"
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1306 { 1306 {
1307 desc: "exotic types", 1307 desc: "exotic types",
1308 src: &ExoticTypes{ 1308 src: &ExoticTypes{
1309 BS: "sup", 1309 BS: "sup",
1310 }, 1310 },
1311 want: &ExoticTypes{ 1311 want: &ExoticTypes{
1312 BS: "sup", 1312 BS: "sup",
1313 }, 1313 },
1314 }, 1314 },
1315 { 1315 {
1316 desc: "exotic type projection",
1317 src: PropertyMap{
1318 "BS": {mp([]byte("I'mABlobKey"))},
1319 },
1320 want: &ExoticTypes{
1321 BS: "I'mABlobKey",
1322 },
1323 },
1324 {
1316 desc: "underspecified types", 1325 desc: "underspecified types",
1317 src: &Underspecified{}, 1326 src: &Underspecified{},
1318 plsErr: "non-concrete interface", 1327 plsErr: "non-concrete interface",
1319 }, 1328 },
1320 { 1329 {
1321 desc: "mismatch (string)", 1330 desc: "mismatch (string)",
1322 src: PropertyMap{ 1331 src: PropertyMap{
1323 "K": {mp(199)}, 1332 "K": {mp(199)},
1324 "S": {mp([]byte("cats"))}, 1333 "S": {mp([]byte("cats"))},
1325 "F": {mp("nurbs")}, 1334 "F": {mp("nurbs")},
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
1944 So(pls.SetMeta("id", "sup|1337"), ShouldBeTrue) 1953 So(pls.SetMeta("id", "sup|1337"), ShouldBeTrue)
1945 So(ide.EmbeddedID, ShouldResemble, EmbeddedID{"sup", 133 7}) 1954 So(ide.EmbeddedID, ShouldResemble, EmbeddedID{"sup", 133 7})
1946 1955
1947 So(pls.GetAllMeta(), ShouldResembleV, PropertyMap{ 1956 So(pls.GetAllMeta(), ShouldResembleV, PropertyMap{
1948 "$id": {mpNI("sup|1337")}, 1957 "$id": {mpNI("sup|1337")},
1949 "$kind": {mpNI("IDEmbedder")}, 1958 "$kind": {mpNI("IDEmbedder")},
1950 }) 1959 })
1951 }) 1960 })
1952 }) 1961 })
1953 } 1962 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698