Reorganize tests into public/internal#762
Merged
isaacbrodsky merged 6 commits intouber:masterfrom Mar 15, 2023
Merged
Conversation
Collaborator
Author
dfellis
reviewed
Mar 13, 2023
| #include "vertex.h" | ||
|
|
||
| SUITE(Vertex) { | ||
| TEST(directionForVertexNum_badVerts) { |
Collaborator
There was a problem hiding this comment.
Was this test deleted accidentally?
isaacbrodsky
commented
Mar 13, 2023
| #include "vertex.h" | ||
|
|
||
| SUITE(Vertex) { | ||
| TEST(vertexNumForDirection_hex) { |
Collaborator
Author
There was a problem hiding this comment.
@dfellis this should be where the test you commented on moved to?
nrabinowitz
approved these changes
Mar 14, 2023
| #include "test.h" | ||
| #include "utility.h" | ||
|
|
||
| SUITE(h3ToLocalIj) { |
Collaborator
There was a problem hiding this comment.
Nit: Doesn't much matter, but should these have the -Internal suffix in the suite name?
Collaborator
Author
There was a problem hiding this comment.
We can -- although maybe we should just use a macro like __FILE__ or an extension macro like __FILE_NAME__ instead.
dfellis
approved these changes
Mar 15, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.