testing: reconsider expect/got order #1181

Open
opened 2024-03-10 19:24:40 +00:00 by emidoots · 0 comments
emidoots commented 2024-03-10 19:24:40 +00:00 (Migrated from github.com)

Today we have:

try testing.expect(T, want).eql(got);

Worth considering if this is more correct by majority opinion:

try testing.expect(got).eql(T, want);

In other words - our little testing wrapper has failed to correctly express order more clearly than testing.expectEqual from the stdlib - that needs to be fixed.

Today we have: ``` try testing.expect(T, want).eql(got); ``` Worth considering if this is more correct by majority opinion: ``` try testing.expect(got).eql(T, want); ``` In other words - our little testing wrapper has failed to correctly express order more clearly than `testing.expectEqual` from the stdlib - that needs to be fixed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hexops/mach#1181
No description provided.