feat!: rename test_inputs back to examples
This commit is contained in:
parent
000001900c
commit
0000020049
|
@ -24,7 +24,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "aoc"
|
||||
version = "17.0.0"
|
||||
version = "20.0.0"
|
||||
dependencies = [
|
||||
"dotenv",
|
||||
"hashbrown 0.13.1",
|
||||
|
@ -68,9 +68,9 @@ checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c"
|
|||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.77"
|
||||
version = "1.0.78"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4"
|
||||
checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d"
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
|
@ -353,9 +353,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "ipnet"
|
||||
version = "2.5.1"
|
||||
version = "2.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f88c5561171189e69df9d98bcf18fd5f9558300f7ea7b801eb8a0fd748bd8745"
|
||||
checksum = "11b0d96e660696543b251e58030cf9787df56da39dab19ad60eae7353040917e"
|
||||
|
||||
[[package]]
|
||||
name = "itertools"
|
||||
|
@ -666,9 +666,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.149"
|
||||
version = "1.0.150"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "256b9932320c590e707b94576e3cc1f7c9024d0ee6612dfbcf1cb106cbe8e055"
|
||||
checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91"
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "aoc"
|
||||
version = "19.0.0"
|
||||
version = "20.0.0"
|
||||
edition = "2021"
|
||||
authors = ["Matej Janežič <janezic.mj@gmail.com>"]
|
||||
default-run = "aoc"
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
- `<day>.rs`: solution files
|
||||
- `*.rs`: convenience scripts
|
||||
- `inputs/`: this directory is gitignored, input files go here
|
||||
- `test_inputs/`: example files go here; you can push this as test are run in ci
|
||||
- `examples/`: example files go here; you can push this as test are run in ci
|
||||
- `helpers.rs`: helper functions you can reuse in solution files go here
|
||||
- `lib.rs`: contains framework code
|
||||
- `main.rs`: contains framework code
|
||||
|
|
|
@ -24,12 +24,12 @@ mod tests {
|
|||
use super::*;
|
||||
#[test]
|
||||
fn test_part_one() {
|
||||
let input = aoc::read_file("test_inputs", DAY);
|
||||
let input = aoc::read_file("examples", DAY).trim();
|
||||
assert_eq!(part_one(&input), None);
|
||||
}
|
||||
#[test]
|
||||
fn test_part_two() {
|
||||
let input = aoc::read_file("test_inputs", DAY);
|
||||
let input = aoc::read_file("examples", DAY).trim();
|
||||
assert_eq!(part_two(&input), None);
|
||||
}
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ fn main() {
|
|||
let day_padded = format!("{day:02}");
|
||||
|
||||
let input_path = format!("src/inputs/{day_padded}.txt");
|
||||
let example_path = format!("src/test_inputs/{day_padded}.txt");
|
||||
let example_path = format!("src/examples/{day_padded}.txt");
|
||||
let module_path = format!("src/bin/{day_padded}.rs");
|
||||
|
||||
let mut file = match safe_create_file(&module_path) {
|
||||
|
|
Loading…
Reference in New Issue