46 lines
692 B
Rust
46 lines
692 B
Rust
enum Instruction {
|
|
Half,
|
|
Triple,
|
|
Increment,
|
|
Jump,
|
|
JumpEven,
|
|
JumpOne,
|
|
}
|
|
|
|
pub fn process_part1(input: &str) -> i32 {
|
|
let mut a = 0;
|
|
let mut b = 0;
|
|
let lines = input
|
|
.lines()
|
|
.map(|line| line.to_string())
|
|
.collect::<Vec<String>>();
|
|
let mut idx = 0;
|
|
b
|
|
}
|
|
|
|
pub fn process_part2(input: &str) -> i32 {
|
|
0
|
|
}
|
|
|
|
#[cfg(test)]
|
|
mod tests {
|
|
use super::*;
|
|
|
|
const INPUT: &str = "inc a
|
|
jio a, +2
|
|
tpl a
|
|
inc a";
|
|
|
|
#[test]
|
|
fn part1() {
|
|
let result = process_part1(INPUT);
|
|
assert_eq!(result, 2);
|
|
}
|
|
|
|
#[test]
|
|
fn part2() {
|
|
let result = process_part2(INPUT);
|
|
assert_eq!(result, 0);
|
|
}
|
|
}
|