tests improved

This commit is contained in:
2024-06-26 04:29:40 +02:00
parent 7164e8816c
commit fe5c8e9619
8 changed files with 81 additions and 23 deletions
+2 -2
View File
@@ -98,7 +98,7 @@ func TestToIntOk(t *testing.T) {
wantValue := int(64)
wantErr := error(nil)
gotValue, gotErr := ToInt(source, "test")
gotValue, gotErr := ToGoInt(source, "test")
if gotErr != nil || gotValue != wantValue {
t.Errorf("toInt(%v, \"test\") gotValue=%v, gotErr=%v -> wantValue=%v, wantErr=%v",
@@ -111,7 +111,7 @@ func TestToIntErr(t *testing.T) {
wantValue := 0
wantErr := errors.New(`test expected integer, got uint64 (64)`)
gotValue, gotErr := ToInt(source, "test")
gotValue, gotErr := ToGoInt(source, "test")
if gotErr.Error() != wantErr.Error() || gotValue != wantValue {
t.Errorf("toInt(%v, \"test\") gotValue=%v, gotErr=%v -> wantValue=%v, wantErr=%v",