Skip to content

fix tck tests #521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

fix tck tests #521

wants to merge 9 commits into from

Conversation

EtienneLt
Copy link
Contributor

@EtienneLt EtienneLt commented Apr 28, 2025

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • A PR or issue has been opened in all impacted repositories (if any)

Does this PR already have an issue describing the problem?
no

What kind of change does this PR introduce?
bug fix

What is the current behavior?
when the low tap position is set position is not managed

What is the new behavior (if this is a feature change)?
deplacing the position according to a new low tap position set

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

Signed-off-by: Etienne LESOT <[email protected]>
@EtienneLt EtienneLt self-assigned this Apr 28, 2025
@EtienneLt EtienneLt requested a review from antoinebhs April 28, 2025 06:55
Signed-off-by: Etienne LESOT <[email protected]>
Signed-off-by: Etienne LESOT <[email protected]>
@@ -14,6 +14,6 @@
public class SwitchSetRetainedTest extends AbstractSwitchSetRetainedTest {
@Override
public void test() {
// FIXME
// FIXME when support multi-thread access
Copy link
Collaborator

Choose a reason for hiding this comment

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

strange to need this for SwitchSetRetainedTest.test ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes but you should try

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I feel like it's useless in this test, it seems to test another class more than the present one. I'll ask about it

@antoinebhs
Copy link
Collaborator

Update PR description

@EtienneLt EtienneLt requested a review from antoinebhs April 30, 2025 11:12
Comment on lines 66 to 67
Integer position = getTapPosition();
setTapPosition(position != null ? position + (getLowTapPosition() - oldValue) : null);
Copy link
Member

Choose a reason for hiding this comment

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

Why specifically using an Integer?

Would this not work?

Suggested change
Integer position = getTapPosition();
setTapPosition(position != null ? position + (getLowTapPosition() - oldValue) : null);
setTapPosition(getTapPosition() + getLowTapPosition() - oldValue);

Comment on lines 99 to 101
if (tapPosition < attributes.getLowTapPosition() || tapPosition > getHighTapPosition()) {
throwIncorrectTapPosition(tapPosition, attributes.getLowTapPosition(), getHighTapPosition());
}
Copy link
Member

Choose a reason for hiding this comment

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

You can probably move nearly the whole content of this method in a common method in AbstractTapChanger (except the last line)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -14,6 +14,6 @@
public class SwitchSetRetainedTest extends AbstractSwitchSetRetainedTest {
@Override
public void test() {
// FIXME
// FIXME when support multi-thread access
Copy link
Member

Choose a reason for hiding this comment

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

I feel like it's useless in this test, it seems to test another class more than the present one. I'll ask about it

Signed-off-by: Etienne LESOT <[email protected]>
Signed-off-by: Etienne LESOT <[email protected]>
Signed-off-by: Etienne LESOT <[email protected]>
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.

3 participants