uber / h3

Hexagonal hierarchical geospatial indexing system
https://h3geo.org
Apache License 2.0
4.83k stars 459 forks source link

Reorganize tests into public/internal #762

Closed isaacbrodsky closed 1 year ago

isaacbrodsky commented 1 year ago

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.

coveralls commented 1 year ago

Coverage Status

Coverage: 98.657%. Remained the same when pulling c57087fe0526318d9b8ade8c1c32da06bfd73a15 on isaacbrodsky:reorg-internal-tests into f0336b52967034eeec4245aa99b1c2361e97fad9 on uber:master.

isaacbrodsky commented 1 year ago

Coverage Status

Coverage: 98.227% (-0.4%) from 98.657% when pulling e9532a7 on isaacbrodsky:reorg-internal-tests into f0336b5 on uber:master.

Coverage decreasing probably means a test got dropped somewhere in the refactor.