Repository navigation
Conversation
Add measured probes for persisted precision, key/filter lookups, unique collisions, and temporary records across BC 27.5, 28.5, and 29.1. Session: act-on-feedback-issue-7866 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Session: act-on-feedback-issue-7866 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 of 6 tasks
Collaborator
|
This is still a draft, and two checklist items are open: |
Use the corpus test naming convention without changing the measured behavior. Session: act-on-feedback-issue-7866 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The Decimal-key tests can pass despite broken filtering, lookups that do not load records, or blanket rejection of high-scale writes, leaving significant behavior insufficiently verified.
3 open issues
What changed in this PR
This PR extends the AL language test suite to pin Business Central’s Decimal storage behavior, including precision truncation and its effects on record operations.
Changes:
- Adds tests for stored precision, buffer preservation, filters, key lookups, and temporary records.
- Adds Insert, Modify, and Rename collision tests using a unique Decimal secondary key.
- Updates test headers with the reported BC validation versions.
| File | Description |
|---|---|
tests/al-language/record/crud/RcAGetFind.al |
Adds Decimal storage and record-operation assertions with setup and observation helpers. |
tests/al-language/record/crud/DecimalStorageUnique.Table.al |
Adds a local table with a unique Decimal secondary key for collision tests. |
Review effort: Balanced
Comment on lines
+813
to
+836
| Row.SetRange(Amt, Full); | ||
| Observer.Observe('equal_full', Format(Row.Count())); | ||
| Row.SetRange(Amt, Cut); | ||
| Observer.Observe('equal_cut', Format(Row.Count())); | ||
| Row.SetFilter(Amt, '<%1', Full); | ||
| Observer.Observe('less_full', Format(Row.Count())); | ||
| Row.SetFilter(Amt, '<%1', Cut); | ||
| Observer.Observe('less_cut', Format(Row.Count())); | ||
| Row.SetFilter(Amt, '>%1', Full); | ||
| Observer.Observe('greater_full', Format(Row.Count())); | ||
| Row.SetFilter(Amt, '>%1', Cut); | ||
| Observer.Observe('greater_cut', Format(Row.Count())); | ||
| Row.SetRange(Amt, Full, Full); | ||
| Observer.Observe('range_full', Format(Row.Count())); | ||
| Row.SetRange(Amt, Cut, Cut); | ||
| Observer.Observe('range_cut', Format(Row.Count())); | ||
| Row.SetRange(Amt, Cut, Full); | ||
| Observer.Observe('range_cut_full', Format(Row.Count())); | ||
| Observer.Expect('equal_full', '1'); | ||
| Observer.Expect('equal_cut', '1'); | ||
| Observer.Expect('less_full', '0'); | ||
| Observer.Expect('less_cut', '0'); | ||
| Observer.Expect('greater_full', '0'); | ||
| Observer.Expect('greater_cut', '0'); |
Comment on lines
+854
to
+866
| Row.Dc := Full; | ||
| Row.Insert(); | ||
| Observer.Observe('buffer_equal', Format(Row.Dc = Full)); | ||
| Observer.Observe('get_full', Format(Found.Get(Full))); | ||
| Observer.Observe('get_cut', Format(Found.Get(Cut))); | ||
| if Found.FindFirst() then | ||
| Observer.Observe('stored_key_scaled', FormatStoredDecimal(Found.Dc)) | ||
| else | ||
| Observer.Observe('stored_key_scaled', 'no row'); | ||
| Observer.Expect('buffer_equal', 'Yes'); | ||
| Observer.Expect('get_full', 'Yes'); | ||
| Observer.Expect('get_cut', 'Yes'); | ||
| Observer.Expect('stored_key_scaled', '277777777777777.77'); |
Comment on lines
+881
to
+882
| Row.Amount := 0.000000000000000000019; | ||
| Observer.Observe('second_insert', Format(Row.Insert())); |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

What this PR adds or changes
Pin Decimal storage, buffer preservation, filters, key lookups, unique-key collisions, and temporary record behavior observed on Business Central.
Validation:
python .github\scripts\check-object-ids.py .: passed.python .github\scripts\check-singleinstance-fixture-owners.py: passed.python .github\scripts\check-install-triggers.py .: passed.python .github\scripts\test-install-triggers.py: passed.python .github\scripts\test-singleinstance-fixture-owners.py: passed..github/scripts self-tests,Object IDs must be unique and in range, andCoverage facts must not shrinkpassed.Linked issue
n/a
Related: aldevtools/BusinessCentral.AL.Runner#7866
Test area(s)
record/crud/Checklist
Initialize()is the first line of every[Test]procedureInitialize()callsDeleteAll()on every table used in the codeunit_fixtures/objects used; each local object has a// local object: <reason>line<area>/<topic>/(no writer id, issue number or batch name in a folder name)tests/rename-map.tsv(not applicable; none removed or merged)Type_Method_Scenario_Outcome)#if BC28PLUS(or equivalent) with an explanatory comment (not applicable)The new procedures call
Initialize()first and clear the tables they use; existing procedures retain their existing seed setup.