gnolang / gno

Gno: An interpreted, stack-based Go virtual machine to build succinct and composable apps + Gno.land: a blockchain for timeless code and fair open-source
https://gno.land/
Other
878 stars 359 forks source link

Improve `p/uassert` and `p/urequire` #2481

Open moul opened 2 months ago

moul commented 2 months ago

Opening this "good first issue" for anyone who wants to improve uassert and urequire. There are basically three ways to do it:

  1. Add missing helpers from https://github.com/stretchr/testify/blob/master/assert/assertions.go
  2. Improve the implementation (robustness, testing, code, error output rendering, support for new types, etc.)
  3. Update the existing examples/ packages to use uassert and urequire.

Edit:

  1. Enhance the gno test and stdlibs/testing functionality to display more information, such as line and column numbers, for better debugging. Or support the use of Sprintf() for structs with private fields, which is currently blocked for security concerns (in production), but could be beneficial for testing purposes.
kazai777 commented 2 months ago

I've developed a part of testify assert in gno that would complete p/uassert, I was wondering if I should create a separate package or just add the functions and test to p/uassert?

zivkovicmilos commented 2 months ago

@kazai777

You can definitely open up a PR against p/uassert 🙏

kazai777 commented 2 months ago

@kazai777

You can definitely open up a PR against p/uassert 🙏

I just made a PR to add more functions to the p/uassert package