Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(stdlibs): Fuzz for String #1809

Merged
merged 14 commits into from
Mar 29, 2024
Merged

feat(stdlibs): Fuzz for String #1809

merged 14 commits into from
Mar 29, 2024

Conversation

notJoon
Copy link
Member

@notJoon notJoon commented Mar 21, 2024

Description

I have implemented basic Fuzz functions in the testing package and a function to apply fuzzing to string data.

To transform string data, I used genetic algorithms. Additionally, I implemented a Uniform distribution to generate random values and then used the central limit theorem to approximate a normal distribution, thereby enabling the creation of random booleans in the random file.

In this PR, only the string type is handled. I plan to support other types in the future.

@github-actions github-actions bot added the 🧾 package/realm Tag used for new Realms or Packages. label Mar 21, 2024
Copy link

codecov bot commented Mar 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.55%. Comparing base (cb52ae7) to head (f2449f4).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1809      +/-   ##
==========================================
+ Coverage   44.86%   47.55%   +2.69%     
==========================================
  Files         459      388      -71     
  Lines       67625    61279    -6346     
==========================================
- Hits        30341    29144    -1197     
+ Misses      34743    29695    -5048     
+ Partials     2541     2440     -101     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added the 📦 🤖 gnovm Issues or PRs gnovm related label Mar 22, 2024
@notJoon notJoon changed the title [investigate] fuzz test feat(stdlibs): Fuzz for String Mar 25, 2024
@notJoon notJoon marked this pull request as ready for review March 27, 2024 02:53
Copy link
Member

@zivkovicmilos zivkovicmilos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 💯

Please check some comments I've left, otherwise it should be good to go

gnovm/stdlibs/testing/fuzz.gno Outdated Show resolved Hide resolved
gnovm/stdlibs/testing/fuzz.gno Outdated Show resolved Hide resolved
gnovm/stdlibs/testing/fuzz.gno Outdated Show resolved Hide resolved
gnovm/stdlibs/testing/fuzz.gno Outdated Show resolved Hide resolved
gnovm/stdlibs/testing/random.gno Show resolved Hide resolved
gnovm/stdlibs/testing/random_test.gno Outdated Show resolved Hide resolved
gnovm/stdlibs/testing/random_test.gno Outdated Show resolved Hide resolved
@zivkovicmilos
Copy link
Member

@notJoon
The _test.cmd gnovm make directive is failing (tests). Please see what this is about before we merge 🙏

@notJoon
Copy link
Member Author

notJoon commented Mar 29, 2024

@notJoon The _test.cmd gnovm make directive is failing (tests). Please see what this is about before we merge 🙏

Resolved it by using type assertion instead of using ufmt. thanks!

@zivkovicmilos zivkovicmilos merged commit 9ad63e1 into gnolang:master Mar 29, 2024
188 of 189 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🤖 gnovm Issues or PRs gnovm related 🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants