Code Monkey home page Code Monkey logo

fuzzy-octo-umbrella's Introduction

fuzzy-octo-umbrella

Root

gh repo clone n012judge420/fuzzy-octo-umbrella

fuzzy-octo-umbrella's People

Contributors

n012judge420 avatar

Stargazers

 avatar

Watchers

 avatar

fuzzy-octo-umbrella's Issues

I'm not really seeing the value of this test. IM fuzzing is great too: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4134#pullrequestreview-1365745955

  • check correctness of functions (for math)
  • check liveness (whatever we throw at it, function does not revert)

Here you are showing that the function revert for offset between 238 and 255 ... but unit tests already shows that. What else do we want to prove ?

Originally posted by @Amxx in OpenZeppelin/openzeppelin-contracts#4134 (comment)

Well, fuzzing is random input generation and for the above test case, the domain space is very small indeed but also means we can cover the full range (which is not the case for e.g. a domain space of `uint16`). Personally, I like adding such fuzzing tests to ensure that the contracts are somehow future-proof (i.e. if I make a small change, it still checks for all possible values) and can be easily extended if needed. I might be too paranoid here, so if you think in the current state it doesn't make sense, please remove it. But in the near future, such a test might come handy since it can be easily extended.

Well, fuzzing is random input generation and for the above test case, the domain space is very small indeed but also means we can cover the full range (which is not the case for e.g. a domain space of uint16). Personally, I like adding such fuzzing tests to ensure that the contracts are somehow future-proof (i.e. if I make a small change, it still checks for all possible values) and can be easily extended if needed. I might be too paranoid here, so if you think in the current state it doesn't make sense, please remove it. But in the near future, such a test might come handy since it can be easily extended.

Originally posted by @pcaversaccio in OpenZeppelin/openzeppelin-contracts#4134 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.