1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
pub fn run() { println!("Hello, hack-assembler!"); } pub fn add(a: i32, b: i32) -> i32 { a + b } #[test] fn test_add() { // given let a = 2; let b = 3; // when let result = add(a, b); // then assert_eq!(result, 5); }