Refactoring of Delta.IDs & horizon functionality with a PrimaryKey type, needed for implementing UUID based primary keys for backends such as the appengine datastore \n Tests: at top level and if available per backend, if not then just visual
This commit is contained in:
parent
26ceed35cc
commit
abda6cbbb0
11 changed files with 135 additions and 44 deletions
|
|
@ -168,6 +168,12 @@ func TestLoadDatabase(t *testing.T) {
|
|||
t.Errorf("Could not convert from generic to LevelDB QuadStore")
|
||||
}
|
||||
|
||||
//Test horizon
|
||||
horizon := qs.Horizon()
|
||||
if horizon.Int() != 1 {
|
||||
t.Errorf("Unexpected horizon value, got:%d expect:1", horizon.Int())
|
||||
}
|
||||
|
||||
w.AddQuadSet(makeQuadSet())
|
||||
if s := qs.Size(); s != 11 {
|
||||
t.Errorf("Unexpected quadstore size, got:%d expect:11", s)
|
||||
|
|
@ -175,6 +181,10 @@ func TestLoadDatabase(t *testing.T) {
|
|||
if s := ts2.SizeOf(qs.ValueOf("B")); s != 5 {
|
||||
t.Errorf("Unexpected quadstore size, got:%d expect:5", s)
|
||||
}
|
||||
horizon = qs.Horizon()
|
||||
if horizon.Int() != 12 {
|
||||
t.Errorf("Unexpected horizon value, got:%d expect:12", horizon.Int())
|
||||
}
|
||||
|
||||
w.RemoveQuad(quad.Quad{
|
||||
Subject: "A",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue