Git Product home page Git Product logo

assay's People

Contributors

trans avatar

Watchers

 avatar  avatar  avatar

assay's Issues

Better Error Messages

Error messages need improvement.

In particular execution assertions could show actual result.

Global Fail Variable or Instance Level Assays?

Presently the design of Assay is to define the assertion logic as class method in the Assay classes. This has the benefit of not requiring the creation of an object to test an assertion, and the Assay class is only initialized if the assertion fails.

OTOH, this means there is no state, so there methods can't effectively share data. Generally this is not an issue, but for raise, rescue and throw assertions it's a little bit of an issue b/c we can't pass the actual result to the message method in order to inform the developer what actually occurred.

For raise and rescue we might get around this by using $!, but I do not think there is any such work around for throw. Nor if ti becomes an issue for other assays. There are two possible solutions:

  1. Use our won global to pass along failed assertion information.
  2. Define assay logic at the instance level. In some ways I am partial to this solution, though it has some drawbacks of it's own. Mainly, that if Assay are to remain subclasses of Exception we must navigate interface issues between assertion logic and error logic (possible but a bit tricky with initializer), Also, it means every assertion creates a new object --a bit hard on memory foot print for a very temporary object.

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.