Skip to content

Commit 2bbf3cd

Browse files
Keep the test's changes clear of the lines around it
The two tests now come before the fixture, so the existing test's header and the comments around the block stay as they are on main. That lets this branch merge cleanly with a branch that edits those comments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 4c4536c commit 2bbf3cd

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

  • crates/tt-core/src/irs/nodes/utils/sweep_factors

‎crates/tt-core/src/irs/nodes/utils/sweep_factors/tests.rs‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,22 @@ fn pattern(bytes: &[u8]) -> Vec<F> {
4545
// t = 1: single-factor prefix
4646
// -----------------------------------------------------------------------------
4747

48+
#[test]
49+
fn honest_t1_prefix_verifies() {
50+
run_gadget_pipeline(t1_prefix_harness(b"abab")).expect("SweepFactors t=1 prefix should verify");
51+
}
52+
53+
/// The input strings are `"xy"`, but the committed `char^(0)` and everything
54+
/// derived from it are those of `"ab"`.
55+
#[test]
56+
#[ignore = "soundness gap: char^(0) is not bound to the char column of the input"]
57+
fn rotated_chars_of_other_strings_rejected() {
58+
assert!(
59+
run_gadget_pipeline(t1_prefix_harness(b"xyxy")).is_err(),
60+
"`ab%` must not match strings that do not start with `ab`"
61+
);
62+
}
63+
4864
/// The harness of `ab%` with the witness of two strings `"ab"`, over an input
4965
/// whose char column is `input_chars`.
5066
fn t1_prefix_harness(input_chars: &[u8; 4]) -> GadgetHarness<B> {
@@ -223,22 +239,6 @@ fn t1_prefix_harness(input_chars: &[u8; 4]) -> GadgetHarness<B> {
223239
.build()
224240
}
225241

226-
#[test]
227-
fn honest_t1_prefix_verifies() {
228-
run_gadget_pipeline(t1_prefix_harness(b"abab")).expect("SweepFactors t=1 prefix should verify");
229-
}
230-
231-
/// The input strings are `"xy"`, but the committed `char^(0)` and everything
232-
/// derived from it are those of `"ab"`.
233-
#[test]
234-
#[ignore = "soundness gap: char^(0) is not bound to the char column of the input"]
235-
fn rotated_chars_of_other_strings_rejected() {
236-
assert!(
237-
run_gadget_pipeline(t1_prefix_harness(b"xyxy")).is_err(),
238-
"`ab%` must not match strings that do not start with `ab`"
239-
);
240-
}
241-
242242
// -----------------------------------------------------------------------------
243243
// t = 2: two infix factors — `%ab%cd%` against "abcd" | "abcd"
244244
// -----------------------------------------------------------------------------

0 commit comments

Comments
 (0)