Skip to content

Commit

Permalink
🎨 Set File feature as default instead of macro
Browse files Browse the repository at this point in the history
  • Loading branch information
lukacan committed Aug 14, 2024
1 parent df9a90d commit 34efdca
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crates/cli/src/command/fuzz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub enum FuzzCommand {
},
/// Add new fuzz test. Explicit fuzz test name is not yet supported. Implicit name is fuzz_ID, where ID is automatically derived.
Add {
#[clap(default_value = "macro")]
#[clap(default_value = "file")]
snapshots_type: SnapshotsType,
},
}
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ enum Command {
#[clap(default_value = "fuzz")]
tests_type: TestsType,
/// Specifies type of Accounts Snapshots, i.e used derive macro or generated file
#[clap(default_value = "macro")]
#[clap(default_value = "file")]
snapshots_type: SnapshotsType,
},
/// Removes target contents except for KeyPair and removes hfuzz_target folder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ pub fn generate_source_code(programs_data: &[ProgramData]) -> String {
let fuzzer_module: syn::ItemMod = parse_quote! {
pub mod #fuzz_instructions_module_name {
use trident_client::fuzzing::*;
// use crate::accounts_snapshots::*;
use crate::accounts_snapshots::*;

#[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)]
pub enum FuzzInstruction {
Expand Down
5 changes: 2 additions & 3 deletions crates/client/src/templates/trident-tests/test_fuzz.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use trident_client::fuzzing::*;
mod accounts_snapshots;
mod fuzz_instructions;

// TODO: In case of using file extension for AccountsSnapshots
// uncomment the line below
// mod accounts_snapshots;
pub type FuzzInstruction = todo!();

struct MyFuzzData;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pub mod fuzz_example3_fuzz_instructions {
use crate::accounts_snapshots::*;
use trident_client::fuzzing::*;
#[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)]
pub enum FuzzInstruction {
Expand Down

0 comments on commit 34efdca

Please sign in to comment.