Replies: 1 comment
-
very grateful to see this in my tests now 🙏 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
as I was reading through the rust book this weekend, I thought it was interesting their
assertEq!
macros useleft == right
instead of theactual == expected
forge uses. As I was recently using forge on my first project (https://github.com/0xSplits/splits-vesting), this nomenclature was actually something I found quite annoying -- having to figure out & remember which slot was expected & which was actual. I imagine this was inherited fromdapptools
so I think it's worth asking: is this pattern worth preserving?Left == right
is, imo, immediately grokkable in a way thatexpected == actual
isn't. At the very least if we keep expected & actual, should maybe update the first log to showactual == expected
so people know they're reversed in the following logs (e.g. shows b then a, not a then b)source: https://doc.rust-lang.org/book/ch11-01-writing-tests.html
vs
foundry/testdata/lib/ds-test/src/test.sol
Lines 74 to 76 in 3f13a98
2 votes ·
Beta Was this translation helpful? Give feedback.
All reactions