use a failing matcher if selector fails to compile, adjust tests

This commit is contained in:
Martin Angers
2016-06-15 09:27:17 -04:00
parent 9cc531274b
commit 2ab590df05
10 changed files with 81 additions and 61 deletions
+4 -4
View File
@@ -101,13 +101,13 @@ func TestSlice(t *testing.T) {
}
func TestSliceEmpty(t *testing.T) {
sel := Doc().Find("x").Slice(0, 2)
assertLength(t, sel.Nodes, 0)
defer assertPanic(t)
Doc().Find("x").Slice(0, 2)
}
func TestSliceInvalid(t *testing.T) {
sel := Doc().Find("").Slice(0, 2)
assertLength(t, sel.Nodes, 0)
defer assertPanic(t)
Doc().Find("").Slice(0, 2)
}
func TestSliceOutOfBounds(t *testing.T) {