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

[testing] draft cases for private generics #285

Merged
merged 8 commits into from
Jun 27, 2023

Conversation

feliciss
Copy link
Collaborator

@feliciss feliciss commented Jun 14, 2023

Attempt to resolve #265

@steelgeek091
Copy link
Collaborator

The error message should be explicitly displayed in the exp file.

@feliciss
Copy link
Collaborator Author

The error message should be explicitly displayed in the exp file.

Noted. I'll try to add them.

@feliciss feliciss marked this pull request as ready for review June 22, 2023 09:23
41 │ bar<vector<u8>>();
│ ^^^^^^^^^^^^^^^^^

status EXECUTED
Copy link
Contributor

Choose a reason for hiding this comment

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

If the verifier raises an error, the module should not publish success, and the status is not EXECUTED @steelgeek091

Copy link
Collaborator

Choose a reason for hiding this comment

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

Fxied in PR #345

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed this PR.

41 │ bar<vector<u8>>();
│ ^^^^^^^^^^^^^^^^^

status EXECUTED
Copy link
Collaborator

Choose a reason for hiding this comment

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

Fxied in PR #345

}

public fun invoke_publish_bar(s: &signer) {
publish_bar<Foo>(s);
Copy link
Collaborator

Choose a reason for hiding this comment

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

After merging PR #345, some modifications need to be made to the test cases.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Collaborator

@steelgeek091 steelgeek091 left a comment

Choose a reason for hiding this comment

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

The relevant detection Rust code for private_generics has been updated. Please make the necessary modifications and resubmit.

@feliciss
Copy link
Collaborator Author

feliciss commented Jun 27, 2023

The relevant detection Rust code for private_generics has been updated. Please make the necessary modifications and resubmit.

I think you should change the decoration of datatest_stable::harness!?

When changing the line

use rooch_integration_test_runner::run_test;

to

use rooch_integration_test_runner::run_integration_test_with_extended_check;

and use it in test cases in replacement to run_test:

datatest_stable::harness!(run_integration_test_with_extended_check, "integration-tests", r".*\.move");

There would be errors stating that

error[E0308]: mismatched types
  --> crates/rooch-integration-test-runner/tests/tests.rs:3:1
   |
3  | datatest_stable::harness!(run_integration_test_with_extended_check, "integration-tests", r".*\.move");
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | incorrect number of function parameters
   | arguments to this function are incorrect
   |
   = note: expected fn pointer `for<'a> fn(&'a Path) -> Result<_, _>`
                 found fn item `for<'a, 'b, 'c> fn(&'a Path, ..., ...) -> ... {run_integration_test_with_extended_check}`
note: associated function defined here
  --> runner.rs:30:12
   |
30 |     pub fn new(
   |            ^^^
   = note: this error originates in the macro `datatest_stable::harness` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0308`.
error: could not compile `rooch-integration-test-runner` due to previous error

It may originate from adding additional params to function run_integration_test_with_extended_check but no changes leave in datatest_stable::harness! function?

@steelgeek091
Copy link
Collaborator

The relevant detection Rust code for private_generics has been updated. Please make the necessary modifications and resubmit.

I think you should change the decoration of datatest_stable::harness!?

When changing the line

use rooch_integration_test_runner::run_test;

to

use rooch_integration_test_runner::run_integration_test_with_extended_check;

and use it in test cases in replacement to run_test:

datatest_stable::harness!(run_integration_test_with_extended_check, "integration-tests", r".*\.move");

There would be errors stating that

error[E0308]: mismatched types
  --> crates/rooch-integration-test-runner/tests/tests.rs:3:1
   |
3  | datatest_stable::harness!(run_integration_test_with_extended_check, "integration-tests", r".*\.move");
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | incorrect number of function parameters
   | arguments to this function are incorrect
   |
   = note: expected fn pointer `for<'a> fn(&'a Path) -> Result<_, _>`
                 found fn item `for<'a, 'b, 'c> fn(&'a Path, ..., ...) -> ... {run_integration_test_with_extended_check}`
note: associated function defined here
  --> runner.rs:30:12
   |
30 |     pub fn new(
   |            ^^^
   = note: this error originates in the macro `datatest_stable::harness` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0308`.
error: could not compile `rooch-integration-test-runner` due to previous error

It may originate from adding additional params to function run_integration_test_with_extended_check but no changes leave in datatest_stable::harness! function?

The situation is the same for crates/rooch-integration-test-runner and crates/rooch-framework-tests. However, when executing rooch move integration-test under the move package, the situation is different from the previous two and requires special handling.

@feliciss
Copy link
Collaborator Author

The relevant detection Rust code for private_generics has been updated. Please make the necessary modifications and resubmit.

I think you should change the decoration of datatest_stable::harness!?
When changing the line

use rooch_integration_test_runner::run_test;

to

use rooch_integration_test_runner::run_integration_test_with_extended_check;

and use it in test cases in replacement to run_test:

datatest_stable::harness!(run_integration_test_with_extended_check, "integration-tests", r".*\.move");

There would be errors stating that

error[E0308]: mismatched types
  --> crates/rooch-integration-test-runner/tests/tests.rs:3:1
   |
3  | datatest_stable::harness!(run_integration_test_with_extended_check, "integration-tests", r".*\.move");
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | incorrect number of function parameters
   | arguments to this function are incorrect
   |
   = note: expected fn pointer `for<'a> fn(&'a Path) -> Result<_, _>`
                 found fn item `for<'a, 'b, 'c> fn(&'a Path, ..., ...) -> ... {run_integration_test_with_extended_check}`
note: associated function defined here
  --> runner.rs:30:12
   |
30 |     pub fn new(
   |            ^^^
   = note: this error originates in the macro `datatest_stable::harness` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0308`.
error: could not compile `rooch-integration-test-runner` due to previous error

It may originate from adding additional params to function run_integration_test_with_extended_check but no changes leave in datatest_stable::harness! function?

The situation is the same for crates/rooch-integration-test-runner and crates/rooch-framework-tests. However, when executing rooch move integration-test under the move package, the situation is different from the previous two and requires special handling.

Got it. Code in this PR are under directories crates/rooch-integration-test-runner and crates/rooch-framework-tests so it doesn't need special handlings.

I will remain them unchanged and request your review.

@steelgeek091 steelgeek091 merged commit 4dafd3c into rooch-network:main Jun 27, 2023
wubuku added a commit to wubuku/rooch that referenced this pull request Jun 27, 2023
* commit '5c4f49d911ef44975a6de8e2bc8ff8f8b181314c':
  migration rooch network (rooch-network#364)
  Remove the TxContext in the move test file. (rooch-network#362)
  Rename framework modules (rooch-network#361)
  fix README typo (rooch-network#359)
  [integration-test-runner] private_generics tests. (rooch-network#354)
  [testing] draft cases for private generics (rooch-network#285)
  Remove TxContext from the check in the entry function. (rooch-network#360)
  [Framework Testing] Add test to account_storage exists and move_from (rooch-network#358)
  add rust setup to workflow (rooch-network#356)
  Fix the issue of illegal invocation of private_generics in the module without throwing an error. (rooch-network#345) (rooch-network#351)
@feliciss feliciss deleted the issue#265 branch June 27, 2023 21:44
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.

[Testing] Test cases for runtime private_generics verification.
3 participants