Skip to content

#9292: put the member name in front of the test it wrote - #9615

Open
yegor256 wants to merge 2 commits into
masterfrom
9292
Open

yegor256 wants to merge 2 commits into
masterfrom
9292

Conversation

@yegor256

Copy link
Copy Markdown
Member

Closes #9292

Merging.spliced lifted every test of a member into the package object under
the name the member gave it, and passed that name through claimed, the
check meant for real attributes. Two files of one package each naming a test
works stopped the build, although each file is valid alone and the parser
takes both.

A lifted test now carries the name of the member it came from in front of
its own, so works of box/left.eo arrives as left-works and works of
box/right.eo as right-works. The mark the parser writes (p for a test
that must hold, n for one that must throw) stays in front, so everything
downstream — pruning.xsl, eo:test-attr, the JUnit writer — reads the
name as it did. The generated method is then left_works() and the test is
taken as this.take("left-works").

claimed is still there: a prefixed name that the object already holds
stops the build as before.

The refusal this used to be, refusesToLiftOneNameOutOfTwoMembers, is
replaced by a merge pack, tests-of-two-members-keep-their-names.yaml, which
writes the three files of the report and asks for both tests on the other
side, in the XMIR and in the Java. tests-of-a-member-keep-running.yaml
moves to the prefixed names.

Worth saying plainly: this renames the lifted tests of every package member,
can-tell-two-is-above-one of number/lt.eo becoming
lt-can-tell-two-is-above-one. Nothing reads those names but the generated
class, and the name now says which file wrote the test, but if you would
rather keep them as they are and only qualify a test whose name is already
taken, say so and I will narrow it.

All 14 MjMergeTest, 1 MergingTest and 112 MjTranspileTest tests pass.


Generated by Claude Code

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

These counts changed in this branch,
while the lower each one of them, the better:

Metric master branch change
statics 787 789 +2

They are defined in .github/workflows/counts.yml

@github-actions github-actions Bot added the counts Some counts changed in this PR label Oct 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Where the inference numbers of this branch stand, and where the same
numbers stood on master. A share is a percentage of every object in the
program, and the rungs are the counts it is made of, which come along
because a share on its own is a number to game:

Number master branch change
objects 60583 60583 same
named 89.0 89.0 same
rooted at a void 11.0 11.0 same
nothing known 0.0 0.0 same
depth 71.0 71.0 same
nothing at all 0 0 same
a name rooted at a void 6691 6691 same
a formation, voids still free 9126 9126 same
a formation, nothing left free 32031 32031 same
nothing left to find out 12735 12735 same
rooted at a void nobody fills 476 476 same
rooted at a void the callers fill 6212 6212 same
rooted at a void only an atom fills 3 3 same
answered with a choice 1588 1588 same

They come from eo-runtime/target/eo/ladder.txt, written by the inference goal.

@sonarqubecloud

Copy link
Copy Markdown

@yegor256
yegor256 marked this pull request as ready for review October 24, 2026 08:11
Copilot AI balanced review requested due to automatic review settings October 24, 2026 08:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

counts Some counts changed in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

eo:merge fails when a package member has a test with the same name as a test of its package object or of a sibling

3 participants