Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Run instruction tests in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
riptl committed May 11, 2024
1 parent 7e88568 commit 5d82d73
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/bin/sbpf_instr_test/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,36 @@ fn main() {
std::process::exit(1);
}
}

#[cfg(test)]
mod tests {
#[test]
fn test_instr_bitwise() {
assert!(!super::handle_file("tests/instr/bitwise.instr"));
}

#[test]
fn test_instr_int_math() {
assert!(!super::handle_file("tests/instr/int_math.instr"));
}

#[test]
fn test_instr_jump() {
assert!(!super::handle_file("tests/instr/jump.instr"));
}

#[test]
fn test_instr_load() {
assert!(!super::handle_file("tests/instr/load.instr"));
}

#[test]
fn test_instr_opcode() {
assert!(!super::handle_file("tests/instr/opcode.instr"));
}

#[test]
fn test_instr_shift() {
assert!(!super::handle_file("tests/instr/shift.instr"));
}
}

0 comments on commit 5d82d73

Please sign in to comment.