Repository navigation
Vector tests for the drawing table and the drawing file container - #52
Merged
Merged
Conversation
The format facts of the drawing table (key 27, rows of 256 bytes) and of the .dg container (type 0x20, the id list of 47 records and the content start at byte 256) are now backed by the private vectors: - db-tables-office-sec027-drawings.bin: the whole drawing table of the office sample, 24 rows, with the expected id, object type, mark, save times, file name and type name of every row and the row stamps a and b. - db-container-office-dg-head272.bin: the first 272 unpacked bytes of a drawing file: the 12-byte header, the record list and the first 16 bytes of the content area. VectorTests.Drawings decodes both and checks the manifest values; the tests skip without the private vector folder.
Take the content of the drawing file from the end of the id list, compare the times without cutting off a fraction, and check through the library that the file is recognised as a drawing and not read as a model database. List the value of the flags key as ignored, because the test checks the flag bytes against its own pattern. Remove a check that could not fail.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The format facts behind
DrawingRowand the drawing files are now backed by the private vectors, so they areregression-checked the same way as the other table facts.
What changed
db-tables-office-sec027-drawings.bin(manifest-db-tables.json): the whole drawing table (key 27,24 rows of 256 bytes) of the office sample, with the expected identifier, object type, mark, creation and
modification times,
.dgfile name, drawing type name and the row stampsaandbof every row.db-container-office-dg-head272.bin(manifest-db-container.json): the first 272 unpacked bytes of adrawing file — the 12-byte header (Xsteel type 0x20, version 9.52), the word 47, the 48 records of the id list
(flags all
04, the last one00) and the first 16 bytes of the content area.VectorTests.Drawingsdecodes both and checks the manifest values; both tests skip without the private vectorfolder, and
TestVectors.CheckKeysfails the test when the manifest grows a key the test does not handle.No product code changes; the tests that run without the private folder skip as before.
Verification
TDBIO_TEST_VECTORSset: TdbIO.Tests 541 passed / 17 skipped on net8.0 and net10.0 (the two new vector testsincluded; the vector bytes are checked against the manifest SHA-256).