Not working for some reason
This commit is contained in:
		
							
								
								
									
										28
									
								
								day_09/src/main.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								day_09/src/main.rs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,28 @@ | ||||
| use day_09::prelude::*; | ||||
|  | ||||
| fn main() { | ||||
|     let input = include_str!("../input.txt"); | ||||
|     println!("{}", part1(input)); | ||||
|     println!("{}", part2(input)); | ||||
| } | ||||
|  | ||||
| #[cfg(test)] | ||||
| mod tests { | ||||
|     use super::*; | ||||
|  | ||||
|     #[test] | ||||
|     fn test_part1() { | ||||
|         let test_input = "0 3 6 9 12 15 | ||||
| 1 3 6 10 15 21 | ||||
| 10 13 16 21 30 45"; | ||||
|         assert_eq!(part1(test_input), "114".to_string()); | ||||
|         panic!(); | ||||
|     } | ||||
|  | ||||
|     #[test] | ||||
|     fn test_part2() { | ||||
|         let test_input = ""; | ||||
|         assert_eq!(part2(test_input), "".to_string()); | ||||
|     } | ||||
|  | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Connor Johnstone
					Connor Johnstone