Comments (8)
That's a bold statement. JUnit is already easily integrated with gradle, gradle test
from ashley.
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.
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.
I would be, however, interested in running performance tests with something like JUnitBenchmarks or JUnitPerf.
from ashley.
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.
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.
Reminds me of the output that clang generates.
from ashley.
@siondream sure no problem :)
from ashley.
Related Issues (20)
- GWT build fails HOT 4
- Kotlin coroutine support HOT 2
- Make removed flag of entity accesable HOT 4
- Iterating system updates entities after they have been removed engine HOT 2
- Ashley should not let you add multiple of the same component to an entity HOT 4
- How to avoid unimplemented poolable component? HOT 1
- Unable to access hasComponent method on Entity HOT 2
- how is the compent managed in memory? HOT 1
- Is this project still alive? Thank you. HOT 7
- Different systems with the same family filter receive different entities. HOT 6
- en
- ImGui wiki page not linked in Home HOT 1
- Html is not supported HOT 1
- [Question] Variable assignments at system update method HOT 1
- PooledEntity instances are not reset() if their pool is full
- Removing an entity before it was added leads to unexpected behaviour. HOT 3
- "Getting Started" guide uses deprecated Gradle syntax HOT 1
- Add system with lower priority during iteration HOT 1
- Add/Remove system improvement HOT 2
- Add a module-info.java
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ashley.