Commit d048e82
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- test_programs/execution_success/slice_regex
- src
2 files changed
+818
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments