Skip to content

Commit

Permalink
cargo init
Browse files Browse the repository at this point in the history
  • Loading branch information
termoshtt committed Jan 3, 2024
1 parent 3d98cd4 commit 5aae6ce
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
[workspace]
members = ["pyo3-stub-gen", "pyo3-stub-gen-derive"]
members = [
"pyo3-stub-gen",
"pyo3-stub-gen-derive",
"pyo3-stub-gen-testing"
]
resolver = "2"

[workspace.dependencies]
Expand Down
8 changes: 8 additions & 0 deletions pyo3-stub-gen-testing/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "pyo3-stub-gen-testing"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
14 changes: 14 additions & 0 deletions pyo3-stub-gen-testing/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}

0 comments on commit 5aae6ce

Please sign in to comment.