Skip to content

Commit

Permalink
fixing test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
zoli committed Jul 15, 2019
1 parent 09599d0 commit 99815b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
16 changes: 2 additions & 14 deletions buffer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,11 @@ func TestRowColLineWord(t *testing.T) {
}

func TestLines(t *testing.T) {
type Test struct {
tests := []struct {
text string
region Region
expect []string
}

tests := []Test{
}{
{
"a\nb",
Region{0, 3},
Expand Down Expand Up @@ -142,16 +140,6 @@ func TestLines(t *testing.T) {
}
}

func TestSomething(t *testing.T) {
var b = NewBuffer()
b.Insert(0, "testaråäöochliteannat€þıœəßðĸʒ×ŋµåäö𝄞")
t.Log(b.Line(0))
t.Log(b.Word(3))
t.Log(b.Word(7))
t.Log(b.Word(11))
t.Log(b.Word(12))
}

func fill(data []rune) {
s := int('a')
e := int('z')
Expand Down
4 changes: 2 additions & 2 deletions node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func TestNode(t *testing.T) {
if sub := test.in.Substr(Region{0, len(test.exp)}); sub != test.exp {
t.Fatalf("%d %s != %s", i, sub, test.exp)
} else if l := test.in.Size(); l != len(sub) {
t.Fatalf("%d %d != %d", l, len(sub))
t.Fatalf("%d %d != %d", i, l, len(sub))
}
}
}
Expand Down Expand Up @@ -353,7 +353,7 @@ func TestNodeErase(t *testing.T) {
r := Region{0, b.Size()}

if b.Size() != n.Size() {
t.Fatalf("%d, %d: %d != %d\n%s", m, i, b.Size(), n.Size())
t.Fatalf("%d, %d: %d != %d\n", m, i, b.Size(), n.Size())
} else if e, a := string(b.SubstrR(r)), string(n.SubstrR(r)); e != a {
r = Region{0, 20}
e = string(b.SubstrR(r))
Expand Down

0 comments on commit 99815b1

Please sign in to comment.