Giter Club home page Giter Club logo

Comments (5)

jlink avatar jlink commented on July 20, 2024

from jqwik.

jlink avatar jlink commented on July 20, 2024

The generation bug should be fixed in f6dc8c4 and is available in 1.1.2-SNAPSHOT.

However, what you probably want to do in your property is set the scale (number of interesting decimal places) to 3, so that values between 0.001 and 0.200 will be generated:

@Property
fun `what`(@ForAll @DoubleRange(min = 0.001, max = 0.2) @Scale(3) grow: Double) {
}

from jqwik.

michaelmosmann avatar michaelmosmann commented on July 20, 2024

thanks:)

but we wanted something like @DoubleRange(minExcluding=0.0 ...) so we tried (because we were lazy) min=0.0000001 and then the test failed.. :)

from jqwik.

jlink avatar jlink commented on July 20, 2024

Are you certaing you're using version 1.1.2-SNAPSHOT? I tried to replicate and did not get a failure.
If you still get a failure please provide the exact code.

BTW, you can exclude the borders by using net.jqwik.api.Assume:

@Property
fun `what`(@ForAll @DoubleRange(min = 0.001, max = 0.2) @Scale(3) grow: Double) {
     Assume.that(grow != 0.0); // Might not be valid Kotlin code but you get the point
}

from jqwik.

michaelmosmann avatar michaelmosmann commented on July 20, 2024

we can not test with 1.1.2-SNAPSHOT.. but i am sure that the bug is gone:)

and 'Assume.that(grow != 0.0);' is valid kotlin code (you dont need the ';' but it is ok) and worked as expected.. thanks:)

from jqwik.

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.