diff options
| author | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-02-23 20:02:41 +0100 |
|---|---|---|
| committer | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-02-23 20:02:41 +0100 |
| commit | 701c38433454d5afd833bb94723ab2e1f4bbe9bd (patch) | |
| tree | 5d9d2a7e41ed088ff1c0baceab50dd54ca2db8a3 | |
| parent | 48a673f3cb6b5b1f7bb79808d596b1df36ab5f46 (diff) | |
| download | sylt-sections.tar.gz | |
try to make the tests more janksections
| -rw-r--r-- | src/lib.rs | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -842,7 +842,8 @@ mod tests { #[test] fn $fn() { crate::tests::panic_after(std::time::Duration::from_millis(500), || { - match $crate::run_string($prog, true, Vec::new()) { + let prog = std::concat!("q :: fn {", $prog, "\n{}\n}\nq()"); + match $crate::run_string(&prog, true, Vec::new()) { Ok(()) => {}, Err(errs) => { for e in errs.iter() { @@ -859,7 +860,8 @@ mod tests { #[test] fn $fn() { crate::tests::panic_after(std::time::Duration::from_millis(500), || { - $crate::assert_errs!($crate::run_string($prog, true, Vec::new()), $errs); + let prog = std::concat!("q :: fn {", $prog, "\n{}\n}\nq()"); + $crate::assert_errs!($crate::run_string(&prog, true, Vec::new()), $errs); }) } } |
