mirror of
https://github.com/Noratrieb/dilaria.git
synced 2026-01-14 17:35:03 +01:00
restructure syntax
This commit is contained in:
parent
c916611bdc
commit
266eeb7327
96 changed files with 624 additions and 151 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#[macro_export]
|
||||
macro_rules! run_test {
|
||||
($name:ident, $code:expr) => {
|
||||
($(#[$attr:tt])* $name:ident, $code:expr) => {
|
||||
$(#[$attr])*
|
||||
#[test]
|
||||
fn $name() {
|
||||
let code = $code;
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ print "correct3";
|
|||
);
|
||||
|
||||
run_test!(
|
||||
#[ignore]
|
||||
parameters,
|
||||
r#"
|
||||
fn fancy_print(str) {
|
||||
|
|
@ -54,6 +55,7 @@ fancy_print("correct");
|
|||
);
|
||||
|
||||
run_test!(
|
||||
#[ignore]
|
||||
parameters_and_return,
|
||||
r#"
|
||||
fn add(a, b) {
|
||||
|
|
@ -71,6 +73,7 @@ if added == 6 {
|
|||
);
|
||||
|
||||
run_test!(
|
||||
#[ignore]
|
||||
fib5,
|
||||
r#"
|
||||
fn fib(n) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue