GH-12: Add a language-agnostic set of regression tests#74
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR adds a comprehensive language-agnostic regression test suite for the dimensional variable library. The test suite uses JSON-based test vectors that are shared across all language bindings (Rust, Python, C++), ensuring consistent behavior across implementations. This addresses issue GH-12 by establishing a unified testing framework.
Changes:
- Added JSON schema and test vectors (
schema.json,units_tests.json,math_tests.json) defining test cases for unit construction, conversion, and mathematical operations - Implemented test runners for each language binding that read and execute the JSON test vectors
- Extended C/C++ API with missing mathematical functions (ln, log2, log10, sin, cos, tan, neg, abs) to achieve feature parity
- Updated CI workflows to run the new regression tests alongside existing tests
- Added AGENTS.md documentation to guide AI coding tools working in the repository
- Bumped version from 0.3.2 to 0.3.3
Reviewed changes
Copilot reviewed 18 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/schema.json | JSON schema defining the structure of regression test vectors |
| tests/units_tests.json | Test vectors for unit construction and conversion operations |
| tests/math_tests.json | Test vectors for mathematical operations (arithmetic, powers, trigonometry) |
| tests/regression_rust_tests.rs | Rust test runner that executes JSON test vectors against the core Rust library |
| tests/regression_python_tests.py | Python test runner that executes JSON test vectors against Python bindings |
| tests/regression_cpp_test.cpp | C++ test runner that executes JSON test vectors against C++ bindings |
| tests/BUILD.bazel | Bazel build configuration for regression test targets |
| cpp/include/dv_c.h | Added C API declarations for newly exposed mathematical functions |
| cpp/include/dv.hpp | Added C++ wrapper methods for newly exposed mathematical functions |
| cpp/capi/src/lib.rs | Implemented C FFI functions for ln, log2, log10, sin, cos, tan, neg, abs |
| MODULE.bazel | Added dependencies for nlohmann_json (C++) and serde_json (Rust) |
| MODULE.bazel.lock | Updated lockfile with new dependency specifications |
| .github/workflows/main.yaml | Added "test" job and removed extraneous whitespace |
| .github/workflows/_rust.yaml | Added step to run Rust regression tests, fixed quote style |
| .github/workflows/_python.yaml | Added step to run Python regression tests, improved formatting |
| .github/workflows/_c_cpp.yaml | Added step to run C++ regression tests, improved formatting |
| AGENTS.md | New documentation file providing guidance for AI coding tools |
| VERSION.toml | Bumped patch version from 2 to 3 |
| python/BUILD.bazel | Removed trailing whitespace |
| core/BUILD.bazel | Removed trailing whitespace |
cc46d62 to
c18f0ec
Compare
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.
No description provided.