Skip to content

TOOLS-4278 Convert mongoimport typed-fields tests to testify - #1064

Draft
autarch wants to merge 1 commit into
TOOLS-4278-convey-to-testify-mongoimport-csvfrom
TOOLS-4278-convey-to-testify-mongoimport-typed-fields
Draft

TOOLS-4278 Convert mongoimport typed-fields tests to testify#1064
autarch wants to merge 1 commit into
TOOLS-4278-convey-to-testify-mongoimport-csvfrom
TOOLS-4278-convey-to-testify-mongoimport-typed-fields

Conversation

@autarch

@autarch autarch commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

The densest GoConvey file in the repo: 46 Convey blocks and 126 So call
sites, almost all (input, expected) pairs. These collapse into
table-driven cases, so the file gets shorter (450 -> 446 lines) while
asserting exactly the same 184 runtime assertions.

The pre-existing generic cast[T] helper keeps its type assertion as a
reported failure rather than a panic; it just takes *testing.T now.

Three cases skip the error check their sibling cases perform
(fieldautoparser -2147483649, fieldint32parser -2147483648,
fieldint64parser -2147483649), and NewFieldParser's error is discarded at
every construction site. Both are preserved as-is rather than fixed, to
keep this a mechanical refactor. Worth a follow-up.

No behavior change.

The densest GoConvey file in the repo: 46 Convey blocks and 126 So call
sites, almost all (input, expected) pairs. These collapse into
table-driven cases, so the file gets shorter (450 -> 446 lines) while
asserting exactly the same 184 runtime assertions.

The pre-existing generic cast[T] helper keeps its type assertion as a
reported failure rather than a panic; it just takes *testing.T now.

Three cases skip the error check their sibling cases perform
(fieldautoparser -2147483649, fieldint32parser -2147483648,
fieldint64parser -2147483649), and NewFieldParser's error is discarded at
every construction site. Both are preserved as-is rather than fixed, to
keep this a mechanical refactor. Worth a follow-up.

No behavior change.

autarch commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant