forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ad4f4d9
commit 1f89431
Showing
20 changed files
with
49 additions
and
49 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,10 +15,10 @@ https://github.com/novifinancial/serde-reflection | |
In this example, we will update one of our core types (SuiError), and then update the manifest: | ||
|
||
``` | ||
[email protected]➜~/tmp/fastnft(main)» git checkout main [7:40:40] | ||
[email protected]➜~/tmp/sui(main)» git checkout main [7:40:40] | ||
Already on 'main' | ||
Your branch is up to date with 'origin/main'. | ||
[email protected]➜~/tmp/fastnft(main)» ruplacer --subvert 'CertificateAuthorityReuse' 'CertificateAuthorityDuplicate' --go [8:42:33] | ||
[email protected]➜~/tmp/sui(main)» ruplacer --subvert 'CertificateAuthorityReuse' 'CertificateAuthorityDuplicate' --go [8:42:33] | ||
./sui_types/src/error.rs:103 - CertificateAuthorityReuse, | ||
./sui_types/src/error.rs:103 + CertificateAuthorityDuplicate, | ||
|
@@ -36,30 +36,30 @@ Performed 4 replacements on 196 matching files | |
Now our code is modified in a way that will make the format test fail: let's update the manifest. | ||
|
||
``` | ||
[email protected]➜~/tmp/fastnft(main✗)» cd sui_core [8:43:38] | ||
[email protected]➜tmp/fastnft/sui_core(main✗)» cargo -q run --example generate-format -- print > tests/staged/sui.yaml | ||
[email protected]➜~/tmp/sui(main✗)» cd sui_core [8:43:38] | ||
[email protected]➜tmp/sui/sui_core(main✗)» cargo -q run --example generate-format -- print > tests/staged/sui.yaml | ||
``` | ||
|
||
|
||
Let's check that we pass the test again: | ||
``` | ||
[email protected]➜tmp/fastnft/sui_core(main✗)» cargo test format 2>&1 |tail -n 40 [8:47:22] | ||
[email protected]➜tmp/sui/sui_core(main✗)» cargo test format 2>&1 |tail -n 40 [8:47:22] | ||
Finished test [unoptimized + debuginfo] target(s) in 0.35s | ||
Running unittests (/Users/huitseeker/tmp/fastnft/target/debug/deps/sui_core-5796871991341984) | ||
Running unittests (/Users/huitseeker/tmp/sui/target/debug/deps/sui_core-5796871991341984) | ||
running 0 tests | ||
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 52 filtered out; finished in 0.00s | ||
Running tests/format.rs (/Users/huitseeker/tmp/fastnft/target/debug/deps/format-ecdfa91a67810be3) | ||
Running tests/format.rs (/Users/huitseeker/tmp/sui/target/debug/deps/format-ecdfa91a67810be3) | ||
running 1 test | ||
Finished dev [unoptimized + debuginfo] target(s) in 0.20s | ||
Running `target/debug/examples/generate-format test` | ||
test test_format ... ok | ||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.48s | ||
[email protected]➜tmp/fastnft/sui_core(main✗)» git status -s [8:47:38] | ||
[email protected]➜tmp/sui/sui_core(main✗)» git status -s [8:47:38] | ||
M tests/staged/sui.yaml | ||
M ../sui_types/src/error.rs | ||
M ../sui_types/src/messages.rs | ||
|
Oops, something went wrong.