-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathcsi_test.go
More file actions
39 lines (31 loc) · 725 Bytes
/
csi_test.go
File metadata and controls
39 lines (31 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package bix
import (
"compress/gzip"
"os"
"testing"
. "gopkg.in/check.v1"
)
func Test(t *testing.T) { TestingT(t) }
type BixSuite struct{}
var _ = Suite(&BixSuite{})
func (s *BixSuite) TestReadCSI(c *C) {
f, err := os.Open("tests/csitest.bed.gz.csi")
if err != nil {
c.Fatal(err)
}
g, err := gzip.NewReader(f)
if err != nil {
c.Fatal(err)
}
cs, err := NewCSI(g)
if err != nil {
c.Fatal(err)
}
c.Check(cs.NameColumn(), Equals, 1)
c.Check(cs.BeginColumn(), Equals, 2)
c.Check(cs.EndColumn(), Equals, 3)
c.Check(cs.Skip(), Equals, 0)
c.Check(cs.NumRefs(), Equals, len(cs.chroms))
c.Check(cs.MetaChar(), Equals, '#')
c.Check(cs.chroms, DeepEquals, []string{"1", "2", "3", "4", "5", "6", "9"})
}