Skip to content

Commit

Permalink
init test
Browse files Browse the repository at this point in the history
  • Loading branch information
shuo-young committed Jan 10, 2024
1 parent 8cff799 commit 7578d29
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 34 deletions.
2 changes: 1 addition & 1 deletion src/graph/call_graph.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{contract::contract::Contract, Source};
use std::collections::{HashMap, HashSet};

#[allow(unused_attributes)]
#[allow(dead_code)]
pub struct CallGraph {
output: String,
visited_contracts: HashSet<String>,
Expand Down
8 changes: 1 addition & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
#[cfg(test)]
mod tests {
#[test]
fn exploration() {
assert_eq!(2 + 2, 4);
}

#[test]
fn another() {
panic!("Make this test fail");
}
fn test_input() {}
}
28 changes: 2 additions & 26 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,8 @@ struct Source {
level: u32,
}

impl Source {
pub fn new(
platform: String,
logic_addr: String,
storage_addr: String,
func_sign: String,
block_number: u64,
caller: String,
caller_func_sign: String,
call_site: String,
level: u32,
) -> Source {
Source {
platform: platform,
logic_addr: logic_addr,
storage_addr: storage_addr,
func_sign: func_sign,
block_number: block_number,
caller: caller,
caller_func_sign: caller_func_sign,
call_site: call_site,
level: level,
}
}
}

#[allow(unused_mut)]
#[allow(unused_variables)]
#[tokio::main]
async fn main() {
env_logger::init();
Expand Down

0 comments on commit 7578d29

Please sign in to comment.