Commit Graph

12 Commits

Author SHA1 Message Date
Paolo Tranquilli
fce13aeb35 Rust: accept test changes 2024-11-19 17:50:14 +01:00
Paolo Tranquilli
9c95a17882 Rust: add block ids to canonical paths, making them "extended" 2024-10-28 12:41:05 +01:00
Paolo Tranquilli
34b1055c13 Rust: accept test changes 2024-10-25 16:58:04 +02:00
Tom Hvitved
0ec40afa4c Rust: Update expected test output 2024-10-11 12:44:35 +02:00
Arthur Baars
32e9881cfb Rust: update expected output 2024-10-10 14:25:07 +02:00
Arthur Baars
e6e0e6eb66 Rust: accept expected output 2024-09-20 15:51:01 +02:00
Arthur Baars
80d32a2333 Rust: re-generate code 2024-09-19 13:00:46 +02:00
Arthur Baars
8e378d86df Update test data 2024-09-12 22:18:00 +02:00
Paolo Tranquilli
4f90f5fb4c Rust: accept test changes 2024-09-10 17:36:18 +02:00
Paolo Tranquilli
ef06b555c1 Rust: accept test changes 2024-09-10 11:29:54 +02:00
Paolo Tranquilli
8c5cc2efdc Rust: generate test code from schema docstrings
This generates test source files from code blocks in class docstrings.

By default the test code is generated as is, but it can optionally:
* be wrapped in a function providing an adequate context using
  `@rust.doc_test_function(name, *, lifetimes=(), return_type="()", **kwargs)`,
  with `kwargs` providing both generic and normal params depending on
  capitalization
* be skipped altogether using `@rust.skip_doc_test`

So for example an annotation like
```python
@rust.doc_test_function("foo",
                        lifetimes=("a",),
                        T="Eq",
                        x="&'a T",
                        y="&'a T",
                        return_type="&'a T")
```
will result in the following wrapper:
```rust
fn foo<'a, T: Eq>(x: &'a T, y: &'a T) -> &'a T {
    // example code here
}
```
2024-09-06 14:24:42 +02:00
Paolo Tranquilli
885e89a927 Rust: first running tests 2024-08-30 17:45:51 +02:00