Code Monkey home page Code Monkey logo

Comments (8)

warmwaffles avatar warmwaffles commented on May 18, 2024

That's a bold statement. JUnit is already easily integrated with gradle, gradle test

from ashley.

andresaraujo avatar andresaraujo commented on May 18, 2024

What I meant was that spock has its own JUnit runner so it is compatible with most build tools and IDEs same as JUnit (gradle test) with the benefits of simplicity and expressiveness.

from ashley.

dsaltares avatar dsaltares commented on May 18, 2024

I've taken a look at spock and, while it's more expressive than regular Java, it doesn't add much to what we already have with JUnit.

The advantage of using JUnit is that it's plain old Java, just like Ashley. So everyone who contributes to Ashley has a very low entry barrier to write a test. On the other hand, if we used spock, they'd have to spend some time and they might just not write the test.

Although spock is simple, I think the extra dependency is not well justified enough. Nevertheless, I would love to receive some PRs with JUnit tests for Ashley.

I appreciate you taking the time to look into alternatives as well, thanks!

from ashley.

dsaltares avatar dsaltares commented on May 18, 2024

I would be, however, interested in running performance tests with something like JUnitBenchmarks or JUnitPerf.

from ashley.

andresaraujo avatar andresaraujo commented on May 18, 2024

Integrating Spock doesn't mean you need to do every test with spock, you can have both (both running from gradle test) and even the tests report is unified.

i.e:

:core:test

ashley.ComponentTypeTests > sameComponentType FAILED
    java.lang.AssertionError: Values should be different. Actual: 2
        at org.junit.Assert.fail(Assert.java:88)
        at org.junit.Assert.failEquals(Assert.java:185)
        at org.junit.Assert.assertNotEquals(Assert.java:161)
        at org.junit.Assert.assertNotEquals(Assert.java:198)
        at org.junit.Assert.assertNotEquals(Assert.java:209)
        at ashley.ComponentTypeTests.sameComponentType(ComponentTypeTests.java:27)

ashley.ComponentTypeSpec > Should have the same component type FAILED
    Condition not satisfied:

    componentType1.getIndex() != componentType2.getIndex()
    |              |          |  |              |
    |              5          |  |              5
    |                         |  ashley.core.ComponentType@51666b48
    |                         false
    ashley.core.ComponentType@51666b48
        at ashley.ComponentTypeSpec.Should have the same component type(ComponentTypeSpec.groovy:17)

18 tests completed, 2 failed
:core:test FAILED

About benchmarking, it would be really cool if we have some performance tests and maybe some comparisons with Artemis.

from ashley.

dsaltares avatar dsaltares commented on May 18, 2024

Wow, that looks quite comprehensive! Thanks @andresaraujo, it could be a good addition. Let me think about it, is that okay?

What do you think @stbachmann?

from ashley.

warmwaffles avatar warmwaffles commented on May 18, 2024

Reminds me of the output that clang generates.

from ashley.

andresaraujo avatar andresaraujo commented on May 18, 2024

@siondream sure no problem :)

from ashley.

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.