Skip to content
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

Allow to call init and debug inner field in a test module #20389

Open
yanganto opened this issue Nov 22, 2024 · 2 comments
Open

Allow to call init and debug inner field in a test module #20389

yanganto opened this issue Nov 22, 2024 · 2 comments
Assignees

Comments

@yanganto
Copy link
Contributor

Steps to Reproduce Issue

The following repo shows the restrictions about the testcase in a different file.
https://github.com/yanganto/SuiMoveTestIssue

The demo1 and demo2 are the same, and the testcases are the same, the only different is one is in the module and the other is in the test module.

  1. Call sui move test under /demo1
  2. Call sui move test under /demo2

Expected Result

Expected the demo2 should pass.
Specify what outcome you expected should have resulted, but didn't.

Actual Result

The test of demo2 fails, due to the visibility issue.

System Information

  • OS: NixOS
  • Compiler: Rust 1.81
@yanganto
Copy link
Contributor Author

yanganto commented Nov 26, 2024

Hi, I update the readme of the repo, and also propose a solution for this.
https://github.com/yanganto/SuiMoveTestIssue/pull/3/files

If this proposal looks good, and the issue is a not urgent one, I will happy to work on this and make a PR here.

@yanganto
Copy link
Contributor Author

yanganto commented Dec 2, 2024

After a deep look at this issue. The previous proposal is not a good one and the SuiInit is good.

Can we let this go first with debug_assertions? Because we can easily have a special debug build of sui-move without bytecode verifier support at this moment, it will solve the current use case and also the test coverage in quick without any burden on product level, and it will really kind for a contract developer and help us build the ecosystem and community. I am also happy to address this issue.

#20482 is for this idea, and it works shown in CI of yanganto/SuiMoveTestIssue#4

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

No branches or pull requests

3 participants