Skip to content

Commit

Permalink
code coverage WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
sam0x17 committed Sep 28, 2024
1 parent 8e98f43 commit a4ed75a
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
14 changes: 14 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ members = [
"support/tools",
"support/macros",
"support/linting",
"support/procedural-fork",
"support/procedural-fork", "support/code-coverage",
]
exclude = ["support/procedural-fork"]
resolver = "2"
Expand Down
11 changes: 11 additions & 0 deletions support/code-coverage/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "subtensor-code-coverage"
version = "0.1.0"
edition = "2021"

[dependencies]
build-print = "0.1"
syn.workspace = true

[lints]
workspace = true
14 changes: 14 additions & 0 deletions support/code-coverage/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: u64, right: u64) -> u64 {
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 a4ed75a

Please sign in to comment.