-
Notifications
You must be signed in to change notification settings - Fork 473
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
Reorganize tests into public/internal #762
Conversation
@@ -22,19 +22,6 @@ | |||
#include "vertex.h" | |||
|
|||
SUITE(Vertex) { | |||
TEST(directionForVertexNum_badVerts) { |
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.
Was this test deleted accidentally?
#include "vertex.h" | ||
|
||
SUITE(Vertex) { | ||
TEST(vertexNumForDirection_hex) { |
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.
@dfellis this should be where the test you commented on moved to?
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.
Got it.
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.
LGTM
#include "test.h" | ||
#include "utility.h" | ||
|
||
SUITE(h3ToLocalIj) { |
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.
Nit: Doesn't much matter, but should these have the -Internal
suffix in the suite name?
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.
We can -- although maybe we should just use a macro like __FILE__
or an extension macro like __FILE_NAME__
instead.
Reorganizes tests into public and internal categories. The intention is that the public part of the tests should be runnable even when the internal library functions are not available (for example, on Windows, or using HydroniumLabs/h3o). This is not possible today in this PR because there are still some internal functions that are used in various parts of tests.
This PR is intended to only reorganize the tests - there should not be any coverage change or meaningful change to the test suite (or library for that matter).
I'd suggest a combination or replacing function calls with constants or data files (since the data file tests are easiest to port to different bindings or implementations), and when it really helps the test suite, marking some functions as exported for tests. These functions would not be part of the public API for versioning purposes and are not intended to be called by applications, but would be exposed by the library. An example would be
setH3Index
.Also included in this PR is a new CMake option
AUDIT_SOURCE_FILE_LIST
, which is used in CI to ensure the file lists in CMakeLists.txt actually match what's in the repository.