Skip to content

Introducing unit test#6

Merged
chipitsine merged 2 commits into
SoftEtherVPN:masterfrom
synqa:add-unit-test
Mar 28, 2026
Merged

Introducing unit test#6
chipitsine merged 2 commits into
SoftEtherVPN:masterfrom
synqa:add-unit-test

Conversation

@synqa

@synqa synqa commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

Add two test suites using CTest.

  • TestEncodeDecode: A test to verify that data archived using HamCore is stored with the same content.
  • TestArchiveFormat: A test to verify that the structure of the archive created by HamCore is correct.

Each test case uses file filled with random bytes. The test is performed with various file sizes and counts.

To enable testing, build the project with the flag of -DBUILD_TESTING=ON(the default is OFF). Afterward, run the tests using ctest --test-dir build.

followup #3

@chipitsine

Copy link
Copy Markdown
Member

wow

@chipitsine

Copy link
Copy Markdown
Member

btw, as CI is not "build only", shall we enable sanitizers

synqa added 2 commits March 28, 2026 22:50
Add two test suites using CTest.
- TestEncodeDecode: A test to verify that data archived using HamCore
  is stored with the same content.
- TestArchiveFormat: A test to verify that the structure of the archive
  created by HamCore is correct.

Each test case uses file filled with random bytes. The test is performed
with various file sizes and counts.
@synqa synqa marked this pull request as ready for review March 28, 2026 14:50
@chipitsine chipitsine merged commit 7911baa into SoftEtherVPN:master Mar 28, 2026
6 checks passed
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