Skip to content

Commit

Permalink
feat: Add rukt macro
Browse files Browse the repository at this point in the history
  • Loading branch information
vberlier committed Nov 13, 2024
1 parent 8ecedeb commit a287068
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;
#![doc = include_str!("../README.md")]

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
/// Open a [`rukt`] code block.
#[macro_export]
macro_rules! rukt {
($($T:tt)*) => {};
}
10 changes: 10 additions & 0 deletions tests/rukt.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use rukt::rukt;

#[test]
fn expand() {
rukt! {
expand {

}
}
}

0 comments on commit a287068

Please sign in to comment.