Skip to content

Commit d048e82

Browse files
michaeljkleinjfecher
andauthored
chore: add array and slice control flow tests (#5558)
# Description TODO - [x] Make note to finish slice test after `pop_front` issue: #5462 - [x] Refactor `any::<T>()` - [x] Make issues for failing tests ## Problem\* Part of #5362 ## Summary\* Simple combinator-based parsing tests for control flow. - Originally designed for slices, but adapted to arrays by emulating slices as bounded vectors ```rust struct Bvec<T, let N: u32> { inner: [T; N], // elements at indices < offset are zero offset: u32, // elements at indices >= len are zero len: u32, } ``` ## Additional Context This code is hacky, but let me know if any parts are worth cleaning up for the stdlib, e.g. `reverse_array`. ## Documentation\* Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist\* - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings. --------- Co-authored-by: jfecher <jake@aztecprotocol.com>
1 parent c02a6f6 commit d048e82

File tree

2 files changed

+818
-0
lines changed

2 files changed

+818
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[package]
2+
name = "regex"
3+
type = "bin"
4+
authors = [""]
5+
compiler_version = ">=0.31.0"
6+
7+
[dependencies]

0 commit comments

Comments
 (0)