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.
Overview
This PR adds a comprehensive test framework to the cTensor project, implementing a test suite for tensor operators and setting up automated CI testing using GitHub Actions.
Changes
1. Test Suite Structure
tests/
directory with the main test runner (cten_tests.c
)tests/Operator/
directory for operator-specific teststests/Grad/
directory for gradient-related tests. (*These items are yet to be added).tests/csv_reporter.c
andtests/csv_reporter.h
)2. Operator Tests
Added tests for all operators in
src/operator.c
, including3. CI Integration
.github/workflows/run-ctests.yml
to build and run tests on Ubuntu, macOS, and Windows.github/check_all_results.py
to parse CSV test reports.github/check_operator_coverage.py
to ensure all operators have tests.github/workflows/check-operator-test-coverage.yml
to enforce test coverage4. Memory Management
Test Architecture
cten_tests
cten_tests.c
for centralized managementGuide to Test locally
cTensor\tests\README.md
for proper guideNotes