| OLD | NEW | 
|---|
| 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 package memory | 5 package memory | 
| 6 | 6 | 
| 7 import ( | 7 import ( | 
| 8         "bytes" | 8         "bytes" | 
| 9         "testing" | 9         "testing" | 
| 10 | 10 | 
| (...skipping 27 matching lines...) Expand all  Loading... | 
| 38                 } | 38                 } | 
| 39 | 39 | 
| 40                 post.SetInvert(col.Descending) | 40                 post.SetInvert(col.Descending) | 
| 41                 if err := serialize.WriteIndexColumn(pre, col); err != nil { | 41                 if err := serialize.WriteIndexColumn(pre, col); err != nil { | 
| 42                         panic(err) | 42                         panic(err) | 
| 43                 } | 43                 } | 
| 44                 if err := serialize.WriteProperty(post, serialize.WithoutContext
     , prop(v)); err != nil { | 44                 if err := serialize.WriteProperty(post, serialize.WithoutContext
     , prop(v)); err != nil { | 
| 45                         panic(err) | 45                         panic(err) | 
| 46                 } | 46                 } | 
| 47         } | 47         } | 
| 48 »       return queryCursor(bjoin(pre.Bytes(), post.Bytes())) | 48 »       return queryCursor(serialize.Join(pre.Bytes(), post.Bytes())) | 
| 49 } | 49 } | 
| 50 | 50 | 
| 51 type queryTest struct { | 51 type queryTest struct { | 
| 52         // name is the name of the test case | 52         // name is the name of the test case | 
| 53         name string | 53         name string | 
| 54 | 54 | 
| 55         // q is the input query | 55         // q is the input query | 
| 56         q *dstore.Query | 56         q *dstore.Query | 
| 57 | 57 | 
| 58         // err is the error to expect after prepping the query (error, string or
      nil) | 58         // err is the error to expect after prepping the query (error, string or
      nil) | 
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 169                                         So(err, ShouldErrLike, tc.err) | 169                                         So(err, ShouldErrLike, tc.err) | 
| 170 | 170 | 
| 171                                         if tc.equivalentQuery != nil { | 171                                         if tc.equivalentQuery != nil { | 
| 172                                                 So(rq, ShouldResemble, tc.equiva
     lentQuery) | 172                                                 So(rq, ShouldResemble, tc.equiva
     lentQuery) | 
| 173                                         } | 173                                         } | 
| 174                                 }) | 174                                 }) | 
| 175                         } | 175                         } | 
| 176                 }) | 176                 }) | 
| 177         }) | 177         }) | 
| 178 } | 178 } | 
| OLD | NEW | 
|---|