(singleCache SingleChannelCache, sequences []uint64)
| 1207 | } |
| 1208 | |
| 1209 | func verifyCacheSequences(singleCache SingleChannelCache, sequences []uint64) bool { |
| 1210 | |
| 1211 | cache, ok := singleCache.(*singleChannelCacheImpl) |
| 1212 | if !ok { |
| 1213 | return false |
| 1214 | } |
| 1215 | if len(cache.logs) != len(sequences) { |
| 1216 | |
| 1217 | log.Printf("verifyCacheSequences: cache size (%v) not equals to sequences size (%v)", |
| 1218 | len(cache.logs), len(sequences)) |
| 1219 | return false |
| 1220 | } |
| 1221 | for index, seq := range sequences { |
| 1222 | if cache.logs[index].Sequence != seq { |
| 1223 | log.Printf("verifyCacheSequences: sequence mismatch at index %v, cache=%v, sequences=%v", |
| 1224 | index, cache.logs[index].Sequence, seq) |
| 1225 | return false |
| 1226 | } |
| 1227 | } |
| 1228 | return true |
| 1229 | } |
| 1230 | |
| 1231 | // verifyChangesFullSequences compares for a full match on sequence, including compound elements) |
| 1232 | func verifyChangesFullSequences(changes []*ChangeEntry, sequences []string) bool { |
no outgoing calls
no test coverage detected