Skip to content

Commit

Permalink
[minor] Add a new allowed attribute for skipping mutation testing (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
vineethk authored Oct 12, 2024
1 parent 8199026 commit 05bacdf
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
processed 2 tasks
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//# init --addresses Alice=0xf75daa73fc071f93593335eb9033da804777eb94491650dd3f095ce6f778acb6
//# --private-keys Alice=56a26140eb233750cd14fb168c3eb4bd0782b099cde626ec8aff7f3cceb6364f

//# publish --private-key Alice
module Alice::allowed_attributes {
#[mutation::skip]
fun blah() {}

#[fmt::skip]
#[mutation::skip]
fun blah_blah() {}
}
4 changes: 3 additions & 1 deletion aptos-move/framework/src/extended_checks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const INIT_MODULE_FUN: &str = "init_module";
const LEGACY_ENTRY_FUN_ATTRIBUTE: &str = "legacy_entry_fun";
const ERROR_PREFIX: &str = "E";
const EVENT_STRUCT_ATTRIBUTE: &str = "event";
const MUTATION_SKIP_ATTRIBUTE: &str = "mutation::skip";
const RANDOMNESS_ATTRIBUTE: &str = "randomness";
const RANDOMNESS_MAX_GAS_CLAIM: &str = "max_gas";
const RESOURCE_GROUP: &str = "resource_group";
Expand All @@ -52,10 +53,11 @@ const RANDOMNESS_MODULE_NAME: &str = "randomness";

// top-level attribute names, only.
pub fn get_all_attribute_names() -> &'static BTreeSet<String> {
const ALL_ATTRIBUTE_NAMES: [&str; 8] = [
const ALL_ATTRIBUTE_NAMES: [&str; 9] = [
ALLOW_UNSAFE_RANDOMNESS_ATTRIBUTE,
FMT_SKIP_ATTRIBUTE,
LEGACY_ENTRY_FUN_ATTRIBUTE,
MUTATION_SKIP_ATTRIBUTE,
RESOURCE_GROUP,
RESOURCE_GROUP_MEMBER,
VIEW_FUN_ATTRIBUTE,
Expand Down

0 comments on commit 05bacdf

Please sign in to comment.