mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-13 01:47:51 +08:00
15dd028dcb
The parse.node type implements Ranger.
16 lines
261 B
Go
16 lines
261 B
Go
package diag
|
|
|
|
import "testing"
|
|
|
|
type aRanger struct {
|
|
Ranging
|
|
}
|
|
|
|
func TestEmbeddingRangingImplementsRanger(t *testing.T) {
|
|
r := Ranging{1, 10}
|
|
s := Ranger(aRanger{Ranging{1, 10}})
|
|
if s.Range() != r {
|
|
t.Errorf("s.Range() = %v, want %v", s.Range(), r)
|
|
}
|
|
}
|