Debian Codegraph @

bankinfo/bic_info_test.go

raw symbols SCIP
1 package bankinfoscip-go gomod github.com/mitch000001/go-hbci . `github.com/mitch000001/go-hbci/bankinfo`/
2
3 import "testingscip-go gomod github.com/golang/go/src go1.18 testing/"
4
5 func TestSortableBicInfosSortInterfacescip-go gomod github.com/mitch000001/go-hbci . `github.com/mitch000001/go-hbci/bankinfo`/TestSortableBicInfosSortInterface().(t *testingscip-go gomod github.com/golang/go/src go1.18 testing/.Tscip-go gomod github.com/golang/go/src go1.18 testing/T#) {
6 sorted := sortableBicInfosscip-go gomod github.com/mitch000001/go-hbci . `github.com/mitch000001/go-hbci/bankinfo`/sortableBicInfos#{
7 BicInfoscip-go gomod github.com/mitch000001/go-hbci . `github.com/mitch000001/go-hbci/bankinfo`/BicInfo#{BankIDscip-go gomod github.com/mitch000001/go-hbci . `github.com/mitch000001/go-hbci/bankinfo`/BicInfo#BankID.: "30000000"},
8 BicInfoscip-go gomod github.com/mitch000001/go-hbci . `github.com/mitch000001/go-hbci/bankinfo`/BicInfo#{BankIDscip-go gomod github.com/mitch000001/go-hbci . `github.com/mitch000001/go-hbci/bankinfo`/BicInfo#BankID.: "10000000"},
9 BicInfoscip-go gomod github.com/mitch000001/go-hbci . `github.com/mitch000001/go-hbci/bankinfo`/BicInfo#{BankIDscip-go gomod github.com/mitch000001/go-hbci . `github.com/mitch000001/go-hbci/bankinfo`/BicInfo#BankID.: "20000000"},
10 }
11
12 length := sorted.Lenscip-go gomod github.com/mitch000001/go-hbci . `github.com/mitch000001/go-hbci/bankinfo`/sortableBicInfos#Len().()
13
14 if len(sorted) != length {
15 t.Logfscip-go gomod github.com/golang/go/src go1.18 testing/common#Logf().("Expected length to equal %d, got %d\n", len(sorted), length)
16 t.Failscip-go gomod github.com/golang/go/src go1.18 testing/common#Fail().()
17 }
18
19 less := sorted.Lessscip-go gomod github.com/mitch000001/go-hbci . `github.com/mitch000001/go-hbci/bankinfo`/sortableBicInfos#Less().(0, 1)
20
21 if less {
22 t.Logfscip-go gomod github.com/golang/go/src go1.18 testing/common#Logf().("Expected first entry not to be less than second, but was\n")
23 t.Failscip-go gomod github.com/golang/go/src go1.18 testing/common#Fail().()
24 }
25
26 sorted.Swapscip-go gomod github.com/mitch000001/go-hbci . `github.com/mitch000001/go-hbci/bankinfo`/sortableBicInfos#Swap().(0, 1)
27
28 if sorted[0].BankIDscip-go gomod github.com/mitch000001/go-hbci . `github.com/mitch000001/go-hbci/bankinfo`/BicInfo#BankID. != "10000000" {
29 t.Logfscip-go gomod github.com/golang/go/src go1.18 testing/common#Logf().("Expected first entry to have BankId '10000000', but was %q\n", sorted[0].BankIDscip-go gomod github.com/mitch000001/go-hbci . `github.com/mitch000001/go-hbci/bankinfo`/BicInfo#BankID.)
30 t.Failscip-go gomod github.com/golang/go/src go1.18 testing/common#Fail().()
31 }
32
33 if sorted[1].BankIDscip-go gomod github.com/mitch000001/go-hbci . `github.com/mitch000001/go-hbci/bankinfo`/BicInfo#BankID. != "30000000" {
34 t.Logfscip-go gomod github.com/golang/go/src go1.18 testing/common#Logf().("Expected first entry to have BankId '30000000', but was %q\n", sorted[1].BankIDscip-go gomod github.com/mitch000001/go-hbci . `github.com/mitch000001/go-hbci/bankinfo`/BicInfo#BankID.)
35 t.Failscip-go gomod github.com/golang/go/src go1.18 testing/common#Fail().()
36 }
37 }