DUnitX migration: full suite parity, keep DUnit for comparison - #97
Conversation
Record that AEAD architecture must be separated from ChaCha features, and that a full DUnit to DUnitX migration is the prerequisite before that work.
Inventory dual suites, sense-check existing tests, and record that DECDUnitTestSuite stays until a later removal PR.
Compare DECDUnitXTestSuite.dpr to VSoft D12/D13 templates; fold runner hardening into Task 3 of the migration plan.
Record Win32 Console DUnit (1425 run, 12 failures) and Debug DUnitX (1457 found, 15 failures) baselines, coverage gap (CCM/ZIP), and environment notes for the DUnitX migration.
Use non-published virtual hooks (NormalizeAddPaddingResult, ExpectedIsPasswordHash) so ISO10126 and BCrypt keep correct assertions without DUnitX double-discovery.
They only affect DUnitX case counts, not fail-set parity; no cleanup needed.
Define TESTINSIGHT for the TestInsight build config, and reject ISO 10126 padding results whose length does not match the expected pattern before masking random pad bytes.
4018740 to
a2a57e2
Compare
|
Started with evaluation of this one. Will take a bit of time. I didn't fully understand this part of the comment in the .dpr header yet: // — leaving the inc define off keeps DECDUnitTestSuite |
|
I tried to get the DUnitX test project running with TestInsight now, but I have some issues:
|
|
Another small issue: by changing the encoding of TestDECCpherModesCCM.pas from ANSI to UTF8 (which is ok) some3 German umlaut in some comment got replaced by a non printable char. This is in the methods TestTDECCCM.TestDecode, TestTDECCCM.TestEncode, TestTDECCCM.DoTestEncodeStream_TestSingleSet and most likely the comments should be translated into English anyway. |
ANSI→UTF-8 conversion left U+FFFD in four German prüfen comments; replace with English as requested in PR review. Co-authored-by: Olaf Monien <omonien@users.noreply.github.com>
Delphi sources in this project require UTF-8 with BOM (EF BB BF). Co-authored-by: Olaf Monien <omonien@users.noreply.github.com>
|
Hallo Markus,
danke für den Hinweis. Ich habe das im PR korrigiert. Dann habe ich noch PR#104 aufgemacht, wo alles auf Utf8 (mit BOM) umgestellt wird und alle deutschen Kommentarleichen auf Englisch übersetzt werden.
Mit freundlichen Grüßen
Best Regards
Olaf Monien
…On Aug 20, 2026 at 20:35 +0200, Markus ***@***.***>, wrote:
MHumm left a comment (MHumm/DelphiEncryptionCompendium#97)
Another small issue: by changing the encoding of TestDECCpherModesCCM.pas from ANSI to UTF8 (which is ok) some3 German umlaut in some comment got replaced by a non printable char. This is in the methods TestTDECCCM.TestDecode, TestTDECCCM.TestEncode, TestTDECCCM.DoTestEncodeStream_TestSingleSet and most likely the comments should be translated into English anyway.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Rewrite the DECDUnitXTestSuite header so it is clear that DUnitX comes from the .dproj defines, not TestDefines.inc. Use WillRaise/CheckException for padding negative tests so DUnitX records an assertion on the raise path. Co-authored-by: Olaf Monien <omonien@users.noreply.github.com>
|
Hallo Markus, zu den beiden anderen Punkten: Der Kommentar im Zu TestInsight: F9 kenne ich so wie du. Die Play-/Rechtsklick-Buttons in der TestInsight-Toolbar sind eher ein IDE-/Plugin-Thema; daran habe ich nichts geändert. Den roten Hinweis „keine Annahmen vorgenommen“ (z. B. Viele Grüße |
|
Ok, schaue ich mir mal an. Ich kenne eigentlich beim TestInsight die Play usw. Buttons auch als blaue Buttons die ich anklicken kann. Ok, jetzt sind die blau. Rest schaue ich mir mal weiter an. Noch eine Frage: wie ist das mit diesen Mobile Tests? |
|
Hallo Markus,
die Play-Buttons sind TestInsight/IDE, gut dass sie wieder blau sind.
Zu den Mobile-/GUI-Konfigs: Debug, GUI und MobileGUI bauen alle denselben Console-Runner. Es gibt keinen VCL- oder FMX-Testrunner im Projekt. `GUI`/`MobileGUI` sind nur Defines ohne Code dahinter. Ein verbundenes Android-Gerät startet damit also nichts Sinnvolles auf dem Phone.
Einen GUI-Runner brauchen wir m.E. nicht. Sinnvoll sind die gleichen Tests auf mehreren Targets (Win32/Win64, später Android). Console auf Mobile gibt es weiterhin nicht, dafür bräuchte man später eine kleine FMX-Hülle, die die Suite automatisch ausführt. Prio niedrig, wie du schreibst.
Viele Grüße
Olaf
…On Aug 22, 2026 at 09:41 +0200, MHumm/DelphiEncryptionCompendium ***@***.***>, wrote:
MHumm left a comment (MHumm/DelphiEncryptionCompendium#97) Ok, schaue ich mir mal an. Ich kenne eigentlich beim TestInsight die Play usw. Buttons auch als blaue Buttons die ich anklicken kann. Naja, im Zweifel mal SGlienke befragen... Rest schaue ich mir mal weiter an. Noch eine Frage: wie ist das mit diesen Mobile Tests? Ich erinnere mich an eine Jahre zurück liegende Beta oder so wo es von DUnitX auch einen FMX GUI Runner gab, aber EMBT hat scheinbar das Dateiausliefern vermasselt, so dass der für mich gar nicht compilierbar war. Und Consolen Programme für Mobile gibt's trotz meines Jahre alten Requests dafür m.W. immer noch nicht. Ok, Prio ist da nicht so hoch... Die Debug/GUI Build-Konfiguration scheint ja aber doch alles als Console auszuführen oder liege ich da irgendwie falsch? Wie ist das mit MobileGUI? Wenn ich mein Android Smartphone oder Tablet verbinde kann ich das dann darauf ausführen? Muss ich wohl mal testen... — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.
|
For Markus — theme: test infrastructure (prerequisite)
This is the foundation for the cleanup work: make DUnitX a complete, parity-proven runner for the whole suite, while keeping classic DUnit as a comparison baseline.
No production crypto algorithms are changed here.
Why this matters for you
Before larger AEAD / cipher-mode work (and before reviewing a split of PR #90), we need a single trustworthy test signal. Today both runners exist; DUnitX was incomplete and had DUnitX-only failures from dual-stack quirks. After this PR:
What changed (high level)
DECDUnitXTestSuiteUseRTTI := False, console/CI exit codes, TestInsight path)readme.mdParity (Delphi 13 / Win32, at time of work)
TestIsPasswordHashredeclares — accepted (count noise only, no fail impact)Out of scope (intentionally later)
Check*/ DUnitCompatibility to nativeAssert.*Suggested review focus
NormalizeAddPaddingResult,ExpectedIsPasswordHash) — OK as dual-stack bridge?Risk
Low for library users (tests + docs). Medium for maintainers who still open the DUnit project (still valid).
Dependency note
This branch includes
Docs/Cleanup-Roadmap.md(updated for the DUnitX phase). If PR #96 (roadmap only) is already merged, GitHub should auto-merge the common docs with little conflict; otherwise this PR alone is self-contained.Test plan
Source\DEC60.dprojDebug Win32DECDUnitTestSuiteConsole Win32DECDUnitXTestSuiteDebug Win32Details:
Docs/plans/2026-07-22-dunitx-migration.md,Docs/plans/dunitx-parity-log.md