elvish/diag/range_test.go
Qi Xiao 15dd028dcb Introduce diag.Ranger and diag.Ranging for expressing ranges.
The parse.node type implements Ranger.
2018-10-13 14:04:13 +01:00

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)
}
}