OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 package unsafe | |
6 | |
7 import ( | |
8 "testing" | |
9 | |
10 "appengine/memcache" | |
11 | |
12 . "github.com/smartystreets/goconvey/convey" | |
13 ) | |
14 | |
15 func TestUnsafeMemcacheItem(t *testing.T) { | |
16 Convey("unsafe memcache", t, func() { | |
17 // kinda a bogus test, but it forces the init() to run, which ch
ecks the | |
18 // field alignment and should panic bigtime if things are wrong. | |
19 itm := &memcache.Item{} | |
20 So(MCGetCasID(itm), ShouldEqual, 0) | |
21 MCSetCasID(itm, 10) | |
22 So(MCGetCasID(itm), ShouldEqual, 10) | |
23 }) | |
24 } | |
OLD | NEW |