chore(math): initialize pallas-math crate (#474)
This commit is contained in:
parent
9011a2e078
commit
1fdf8dc01f
6 changed files with 53 additions and 0 deletions
1
pallas-math/src/lib.rs
Normal file
1
pallas-math/src/lib.rs
Normal file
|
|
@ -0,0 +1 @@
|
|||
pub mod math;
|
||||
17
pallas-math/src/math.rs
Normal file
17
pallas-math/src/math.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/*!
|
||||
# Cardano Math functions
|
||||
*/
|
||||
|
||||
pub fn add(a: i32, b: i32) -> i32 {
|
||||
a + b
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_add() {
|
||||
assert_eq!(add(1, 2), 3);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue