Skip to content

Commit a0d58c9

Browse files
committed
Update test cases
1 parent be0f750 commit a0d58c9

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

crates/snforge-scarb-plugin/tests/integration/multiple_attributes.rs

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,10 @@ fn works_with_few_attributes() {
9090
core::array::ArrayTrait::span(@arr)
9191
}
9292
93-
#[__internal_config_statement]
9493
fn empty_fn() {
95-
94+
if snforge_std::_internals::is_config_run() {
95+
return;
96+
}
9697
}
9798
",
9899
);
@@ -107,7 +108,6 @@ fn works_with_few_attributes() {
107108
assert_output(
108109
&result,
109110
"
110-
#[__internal_config_statement]
111111
fn empty_fn() {
112112
if snforge_std::_internals::is_config_run() {
113113
let mut data = array![];
@@ -137,7 +137,6 @@ fn works_with_few_attributes() {
137137
assert_output(
138138
&result,
139139
r#"
140-
#[__internal_config_statement]
141140
fn empty_fn() {
142141
if snforge_std::_internals::is_config_run() {
143142
let mut data = array![];
@@ -192,9 +191,10 @@ fn works_with_fuzzer() {
192191
core::array::ArrayTrait::span(@arr)
193192
}
194193
195-
#[__internal_config_statement]
196194
fn empty_fn() {
197-
195+
if snforge_std::_internals::is_config_run() {
196+
return;
197+
}
198198
}
199199
",
200200
);
@@ -211,8 +211,11 @@ fn works_with_fuzzer() {
211211
r"
212212
#[__fuzzer_config(runs: 123, seed: 321)]
213213
#[__fuzzer_wrapper]
214-
#[__internal_config_statement]
215-
fn empty_fn() {}
214+
fn empty_fn() {
215+
if snforge_std::_internals::is_config_run() {
216+
return;
217+
}
218+
}
216219
",
217220
);
218221
}
@@ -262,8 +265,11 @@ fn works_with_fuzzer_before_test() {
262265
263266
#[__fuzzer_config(runs: 123, seed: 321)]
264267
#[__fuzzer_wrapper]
265-
#[__internal_config_statement]
266-
fn empty_fn(f: felt252) {}
268+
fn empty_fn(f: felt252) {
269+
if snforge_std::_internals::is_config_run() {
270+
return;
271+
}
272+
}
267273
",
268274
);
269275

@@ -363,7 +369,6 @@ fn works_with_fuzzer_config_wrapper() {
363369
}
364370
365371
#[fuzzer]
366-
#[__internal_config_statement]
367372
fn empty_fn(f: felt252) {
368373
if snforge_std::_internals::is_config_run() {
369374
let mut data = array![];

crates/snforge-scarb-plugin/tests/integration/single_attributes/test.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,11 @@ fn appends_internal_config_and_executable() {
2929
core::array::ArrayTrait::span(@arr)
3030
}
3131
32-
#[__internal_config_statement]
33-
fn empty_fn() {}
32+
fn empty_fn() {
33+
if snforge_std::_internals::is_config_run() {
34+
return;
35+
}
36+
}
3437
",
3538
);
3639
}

0 commit comments

Comments
 (0)