Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham-kanodia authored Aug 15, 2023
1 parent 7da2502 commit 1d685db
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/main.nr
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,25 @@ fn calculate_hash(num: u32) -> u32 {
}

#[test]
fn test_main() {
fn test_1() {
let num = 127561628;
let hash = calculate_hash(num);

assert(hash == 0x71233de7);
main(num, hash);
}

#[test]
fn test_2() {
let num = 237261828;
let hash = calculate_hash(num);

assert(hash == 0x7F51D567);
}

#[test]
fn test_3() {
let num = 596214892;
let hash = calculate_hash(num);

assert(hash == 0x3F0C8995);
}

0 comments on commit 1d685db

Please sign in to comment.