|
|
|
@ -829,39 +829,3 @@ func TestVariableTopics(t *testing.T) { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func TestMatchSingleTopic_ReturnTrue(t *testing.T) { |
|
|
|
|
bt := []byte("test") |
|
|
|
|
topic := BytesToTopic(bt) |
|
|
|
|
|
|
|
|
|
if !matchSingleTopic(topic, bt) { |
|
|
|
|
t.FailNow() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func TestMatchSingleTopic_WithTail_ReturnTrue(t *testing.T) { |
|
|
|
|
bt := []byte("test with tail") |
|
|
|
|
topic := BytesToTopic([]byte("test")) |
|
|
|
|
|
|
|
|
|
if !matchSingleTopic(topic, bt) { |
|
|
|
|
t.FailNow() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func TestMatchSingleTopic_NotEquals_ReturnFalse(t *testing.T) { |
|
|
|
|
bt := []byte("tes") |
|
|
|
|
topic := BytesToTopic(bt) |
|
|
|
|
|
|
|
|
|
if matchSingleTopic(topic, bt) { |
|
|
|
|
t.FailNow() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func TestMatchSingleTopic_InsufficientLength_ReturnFalse(t *testing.T) { |
|
|
|
|
bt := []byte("test") |
|
|
|
|
topic := BytesToTopic([]byte("not_equal")) |
|
|
|
|
|
|
|
|
|
if matchSingleTopic(topic, bt) { |
|
|
|
|
t.FailNow() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|