Move tag handling out into graph.Tagger

This commit is contained in:
kortschak 2014-07-30 10:15:22 +09:30
parent 0238332ca3
commit 1604dca737
28 changed files with 315 additions and 159 deletions

View file

@ -24,11 +24,11 @@ import (
func TestTag(t *testing.T) {
fix1 := newFixed()
fix1.Add(234)
fix1.AddTag("foo")
fix1.Tagger().Add("foo")
and := NewAnd()
and.AddSubIterator(fix1)
and.AddTag("bar")
out := fix1.Tags()
and.Tagger().Add("bar")
out := fix1.Tagger().Tags()
if len(out) != 1 {
t.Errorf("Expected length 1, got %d", len(out))
}