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)
- Height Map Landscapes have Two Edges marked as Cliffs HOT 7
- Failed to Clone Vehicle UI error
- Landscape Generation UI
- Text box cursor indicator stuck to left side HOT 1
- Text input visual cursor position is always at the beginning HOT 1
- Aircraft stuck not moving HOT 4
- HeightMap class: change Point types to TilePos
- Game hangs when Ticker elapses while editing Route HOT 5
- Bad Vehicle Structure when vehicle deleted HOT 5
- Label and icons overlap in station construction
- Investigate variable map sizes HOT 5
- Issue building AUR/Arch package for missing DEVELOPMENTLOG.md HOT 1
- Crashing when opening. HOT 17
- Create a all loaded objects of type iterator/function HOT 2
- Gridlines on landscape are toggled with the land window HOT 1
- Crash in alertCargoAcceptanceChange/MessageManager::post
- Set maximum width for the toolbars GUI HOT 4
- Multiple coal mines with the same name (minor) HOT 1
- Scenario editor: Can't change name of existing scenario HOT 3
- Scenario editor: Landscape generation options flickering HOT 1
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.