forked from deblan/database-anonymizer
add IsInterger property in Data struct
add tests
This commit is contained in:
parent
5be7927799
commit
60cbaf1530
|
@ -15,6 +15,10 @@ func TestDataFroms(t *testing.T) {
|
|||
t.Fatalf("TestDataFroms: FromInt64 check failed")
|
||||
}
|
||||
|
||||
if !d.IsInteger {
|
||||
t.Fatalf("TestDataFroms: FromInt64 + IsInteger check failed")
|
||||
}
|
||||
|
||||
v := []byte{'A', 'B', 'C'}
|
||||
|
||||
d.FromByte(v)
|
||||
|
@ -22,6 +26,10 @@ func TestDataFroms(t *testing.T) {
|
|||
if d.Value != "ABC" {
|
||||
t.Fatalf("TestDataFroms: FromByte check failed")
|
||||
}
|
||||
|
||||
if d.IsInteger {
|
||||
t.Fatalf("TestDataFroms FromByte + IsInteger check failed")
|
||||
}
|
||||
}
|
||||
|
||||
func TestDataIsTwigExpression(t *testing.T) {
|
||||
|
|
Loading…
Reference in a new issue