Comments (6)
Just go with gtest, I already set up some for our proposed shared library between OpenRCT2 and OpenLoco:
https://github.com/IntelOrca/libsawyer/
from openloco.
I introduced google test to openrct2 and at the time the 1.8.0 release was still fresh. I think gtest does a fine job of providing test framework and has some unique capabilities (like death tests). I ran into some minor issues with gtest which I tried to fix upstream, but it looks like the project is all but abandoned, don't be fooled by the commits that are being made to the googletest repository, they're all for gmock.
For this reason I would consider switching to Catch2, which has matured a lot since the time unit testing was introduced to openrct2.
I'm fine if the test frameworks differ between the two repos, time has shown we don't touch the test code as often for this to be a major problem and we never used the benefits that only gtest provides. That said, gtest is still a strong contender, it does it's job perfectly fine.
from openloco.
I unit test frameworks for C++ are just horrible but there is nothing we can do about that. I am fine with whatever.
I don't know if there is a VS test adaptor for Catch2 though where as there is one for gtest.
from openloco.
I'd love to add some unit testing, does anyone have updated thoughts on GTest vs Catch2, or any other test framework?
Personally I've used GTest before at a previous workplace and haven't used Catch2 before, but I don't have a preference on which framework we use.
Glancing at their respective GitHub pages, they both used a similar macro-style way of declaring tests, both have VS test adapters, both are being updated reasonably frequently. GTest does have way more documentation than Catch2 though.
from openloco.
Easy, I'll try submit a PR some time over the weekend to add GTest
from openloco.
Closing this, as we have introduced the GTest framework and started adding tests for particular modules since.
from openloco.
Related Issues (20)
- Port the height view limiter from OpenRCT2 into OpenLoco HOT 1
- Ghost vehicles stay placed down when placement is interrupted
- Minor visual bugs in 23.12+ with bogeys and train/track draw order
- gcc 14.1 null pointer dereference warning
- Unable to remove / delete competitor trains / vehicles once they have been acquired HOT 1
- Scheduling / preference
- Leave items transparent after build window is closed
- Allow typing the amount of cash like OpenRCT2
- Preferred company can cause crash
- Surface height display bug HOT 1
- Full screen resolution options not respected
- Narrow Gauge vehicles should get a filter in the object selector HOT 4
- Attempting to lower land without enough money turns on underground view
- Ability to prevent trains from turning around when reversing HOT 1
- Waypoint function of the train HOT 1
- Tunnels have no entrance at the end of curved sections, HOT 4
- Height marks on land are incorrect HOT 1
- Turning off new message SFX reverts after exiting scenario HOT 1
- Trains in stations of different close elevations can crash into each other HOT 3
- Add game setting to toggle off vehicle auto-restart time HOT 2
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 openloco.