mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-09 14:41:02 +00:00
explicitly test untested path of valcountize
This commit is contained in:
parent
99f6a1c113
commit
fa2391b948
1 changed files with 17 additions and 0 deletions
|
|
@ -182,6 +182,23 @@ func TestBSIGroup_BaseValue(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
func TestField_ValCountize(t *testing.T) {
|
||||
f := OpenField(t, OptFieldTypeDefault())
|
||||
defer f.Close()
|
||||
// check that you get an empty val count and err
|
||||
// BSIGroupNotFound on nil bsig from
|
||||
// f.bsiGroup(f.name)
|
||||
f.bsiGroups = []*bsiGroup{}
|
||||
v, err := f.valCountize(42, 42, nil)
|
||||
if !reflect.DeepEqual(v, ValCount{}) {
|
||||
t.Errorf("expected %v, got %v", ValCount{}, v)
|
||||
}
|
||||
if err != ErrBSIGroupNotFound {
|
||||
t.Errorf("expected %v, got %v", ErrBSIGroupNotFound, err)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Ensure field can open and retrieve a view.
|
||||
func TestField_DeleteView(t *testing.T) {
|
||||
f := OpenField(t, OptFieldTypeDefault())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue