github.com/TrueBlocks/trueblocks-core/src/apps/chifra@v0.0.0-20241022031540-b362680128f7/pkg/index/download_chunks_test.go (about) 1 // Copyright 2021 The TrueBlocks Authors. All rights reserved. 2 // Use of this source code is governed by a license that can 3 // be found in the LICENSE file. 4 5 package index 6 7 // TODO: BOGUS TEST 8 // func Test_exclude(t *testing.T) { 9 // onDisc := map[string]bool{ 10 // "013337527-013340418": true, 11 // "013340419-013343305": true, 12 // "013346064-013348861": true, 13 // "013348862-013351760": true, 14 // } 15 16 // inManifest := []types.ChunkRecord{ 17 // { 18 // Range: "013337527-013340418", 19 // }, 20 // { 21 // Range: "013340419-013343305", 22 // }, 23 // { 24 // Range: "013346064-013348861", 25 // }, 26 // { 27 // Range: "013348862-013351760", 28 // }, 29 // { 30 // Range: "013387069-013389874", 31 // }, 32 // { 33 // Range: "013389875-013392800", 34 // }, 35 // } 36 37 // result := exclude(utils.GetTestChain(), c ache.Index_Final, onDisc, inManifest, nil) 38 // if len(result) != 2 { 39 // t.Errorf("Wrong length: %d", len(result)) 40 // } 41 42 // if result[0].Range != "013387069-013389874" && 43 // result[1].Range != "013389875-013392800" { 44 // t.Errorf("Bad values: '%s' and '%s'", result[0].Range, result[1].Range) 45 // } 46 // }