1
1
mirror of https://github.com/theoludwig/advent_of_code.git synced 2025-05-18 19:27:51 +02:00

ci: add automated tests/linting/format

This commit is contained in:
2023-12-01 17:26:01 +01:00
parent 0c6ebb6ad4
commit 760686db4c
12 changed files with 106 additions and 16 deletions

1
day_2/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/target

6
day_2/Cargo.toml Normal file
View File

@ -0,0 +1,6 @@
[package]
name = "day_2"
version = "1.0.0"
edition = "2021"
[dependencies]

7
day_2/README.md Normal file
View File

@ -0,0 +1,7 @@
# - Day 2 -
Source: <https://adventofcode.com/2023/day/2>
## Instructions - Part 1
## Instructions - Part 2

18
day_2/src/main.rs Normal file
View File

@ -0,0 +1,18 @@
fn part_1() -> i32 {
142
}
fn main() {
println!("- Day 2: Title -");
println!("Answer Part 1: {}", part_1());
}
#[cfg(test)]
mod day_2_tests {
use super::*;
#[test]
fn test_part_1_example() {
assert_eq!(142, part_1());
}
}