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