Skip to content

Commit 686d3fe

Browse files
wbrezaCopilot
andcommitted
fix: address PR #65 review feedback
- Fix comment: '3 levels up' → '2 levels up' (schema_parity_test.go:29) - Fix int truncation: use float64(goVal) comparison (schema_parity_test.go:121) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8ded40e commit 686d3fe

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

internal/projectconfig/schema_parity_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func repoRoot(t *testing.T) string {
2626
if !ok {
2727
t.Fatal("unable to determine test file path")
2828
}
29-
// thisFile: …/internal/projectconfig/schema_parity_test.go → repo root is 3 levels up
29+
// thisFile: …/internal/projectconfig/schema_parity_test.go → repo root is 2 levels up
3030
return filepath.Join(filepath.Dir(thisFile), "..", "..")
3131
}
3232

@@ -118,8 +118,8 @@ func assertIntDefault(t *testing.T, schemaVal any, goVal int, field string) {
118118
t.Errorf("%s: schema default is %T(%v), expected number", field, schemaVal, schemaVal)
119119
return
120120
}
121-
if int(f) != goVal {
122-
t.Errorf("%s: schema default %d != Go default %d", field, int(f), goVal)
121+
if f != float64(goVal) {
122+
t.Errorf("%s: schema default %v != Go default %d", field, f, goVal)
123123
}
124124
}
125125

0 commit comments

Comments
 (0)