Skip to content

GH-12: Add a language-agnostic set of regression tests#74

Merged
alextac98 merged 6 commits into
mainfrom
dev/GH-12-test-suite
Feb 22, 2026
Merged

GH-12: Add a language-agnostic set of regression tests#74
alextac98 merged 6 commits into
mainfrom
dev/GH-12-test-suite

Conversation

@alextac98

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings February 22, 2026 05:23
@vercel

vercel Bot commented Feb 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dv Ready Ready Preview, Comment Feb 22, 2026 6:06am

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread .github/workflows/_c_cpp.yaml
Comment thread .github/workflows/_python.yaml Outdated
@alextac98 alextac98 force-pushed the dev/GH-12-test-suite branch from cc46d62 to c18f0ec Compare February 22, 2026 06:06
@alextac98 alextac98 merged commit afd2805 into main Feb 22, 2026
18 checks passed
@alextac98 alextac98 deleted the dev/GH-12-test-suite branch February 22, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants