Skip to content

test: add minimal offline test suite - #20

Merged
yang-dong-yd merged 2 commits into
mainfrom
test/add-minimal-smoke-suite
Nov 4, 2026
Merged

yang-dong-yd merged 2 commits into
mainfrom
test/add-minimal-smoke-suite

Conversation

@yang-dong-yd

Copy link
Copy Markdown
Contributor

Summary

Add a minimal offline CTest suite so litearm-cpp keeps a real test gate without restoring the previous fake-firmware test suite. The tests cover the version string, CRC, frame codec, rotation math, and pose normalization; no production code changes.

Changes

  • Add tests/smoke_test.cpp with checks for:
    • version string
    • CRC-16/CCITT-FALSE known vector
    • frame pack/unpack round trip and bad-CRC rejection
    • RPY rotation round trip and rotation-matrix validity
    • as_pose position normalization
  • Add LITEARM_BUILD_TESTS and a litearm_tests CTest target in CMakeLists.txt; the target is built by default.
  • Add a Test step (ctest --test-dir build --output-on-failure) to CI before the existing CLI smoke.
  • Leave include/, src/, cli/, examples, and docs unchanged.

Testing

  • cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
  • cmake --build build --parallel
  • ctest --test-dir build --output-on-failure -> 1/1 tests passed.
  • check-commit.sh --range origin/main..HEAD -> pass.

Issues

None.

Checklist

  • The title follows Conventional Commits and matches the commit subject.
  • The body is written in English.
  • Tests were run and the result is stated above.
  • New and modified human-facing documents are paired with .zh-CN.md.
  • No secrets, credentials, or private URLs are included.
  • Closes is used only when the pull request fully resolves the issue.

@yang-dong-yd
yang-dong-yd merged commit bd7c535 into main Nov 4, 2026
1 check passed
@yang-dong-yd
yang-dong-yd deleted the test/add-minimal-smoke-suite branch November 4, 2026 03:19
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.

1 participant