miller/pkg/bifs/bits_test.go
Adam Lesperance 085e831668
The package version must match the major tag version (#1654)
* Update package version

* Update makefile targets

* Update readme packages

* Remaining old packages via rg/sd
2024-09-20 12:10:11 -04:00

19 lines
404 B
Go

package bifs
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/johnkerl/miller/v6/pkg/mlrval"
)
func TestBIF_bitcount(t *testing.T) {
input1 := mlrval.FromDeferredType("0xcafe")
output := BIF_bitcount(input1)
intval, ok := output.GetIntValue()
assert.True(t, ok)
assert.Equal(t, int64(11), intval)
}
// TODO: copy in more unit-test cases from existing regression-test data