-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use doctest instead of Catch2 for tests #1064
base: main
Are you sure you want to change the base?
Conversation
I'll note that while the point of this is mostly to improve test build times, the test builds seem slower on CI. Subjectively, they're faster on my machine now, so maybe this is just an artifact of doctest not yet being cached? Not sure. A larger sample size is probably needed. |
cesium-native aggressively uses ccache on CI, so it won't even compile source files at all if they don't change. It makes our CI builds really fast, but also makes it impossible to compare build performance on CI. So I wouldn't worry about that, but if you have any doubts about the local performance actually improving, it might be worth doing a quick measurement just to make sure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this @azrogers! Minor comments...
@@ -15,6 +13,24 @@ | |||
#include <string> | |||
#include <vector> | |||
|
|||
using namespace doctest; | |||
|
|||
bool compareVectors( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be in the anonymous namespace. Or maybe moved to CesiumNativeTests
?
|
||
#include <bitset> | ||
#include <climits> | ||
#include <cstddef> | ||
#include <cstring> | ||
#include <ostream> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this header needed?
@@ -21,13 +21,14 @@ | |||
#include <glm/fwd.hpp> | |||
|
|||
#include <cstdint> | |||
#include <ostream> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why ostream is needed here, either.
Closes #69. We've been intending for quite a while to switch to doctest for tests instead of our current test framework, Catch2. Not only is doctest the test framework that other Cesium projects use, but the compile times are also quite a bit faster. It would be good to get this out of the way while we have the chance - as @kring mentioned, it will only get more difficult as time goes on.