Git Product home page Git Product logo

Comments (4)

lawik avatar lawik commented on August 30, 2024

This would benefit from #30

from inky.

nyaray avatar nyaray commented on August 30, 2024

How would this benefit from #30?

I'd say we want numbers to remain literals and not references in our tests. If our tests and production code refer to the same values, we are not testing that the right values are being passed to the devices, making the tests weaker.

Being consistent in how we represent our integers is all fine and well, but going beyond that doesn't have clear benefits to me.

from inky.

lawik avatar lawik commented on August 30, 2024

Okay, that's fair. I agree that literals are probably the way to go. But I think module attributes in the test suite would be beneficial to clarity and reduce the risk of a hexadecimal number being replaced because it is identical but used for a different purpose in a different context. I think that risk is reduced with using module attributes in the test module as opposed to repeating the literals in every test.

What do you think about that approach?

from inky.

nyaray avatar nyaray commented on August 30, 2024

Sounds good!

from inky.

Related Issues (20)

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.