2020-12-01 07:16:56 +01:00
#!/bin/sh
today = $( date +%d)
# this assumes that your puzzle input is already in your clipboard
2020-12-09 08:57:54 +01:00
xsel -b > inputs/day$today
2020-12-01 07:16:56 +01:00
# add trailing newline if necessary
2020-12-09 08:57:54 +01:00
sed -i -e '$a\' inputs/day$today
2020-12-03 10:24:03 +01:00
2020-12-09 08:57:54 +01:00
echo ' #![feature(test)]
2020-12-07 16:17:07 +01:00
extern crate test;
2020-12-11 12:04:38 +01:00
use aoc2020::common::*;
2020-12-07 16:17:07 +01:00
2020-12-10 12:44:07 +01:00
type Parsed = Vec<usize>;
2020-12-07 16:17:07 +01:00
fn read_input( ) -> String {
2020-12-10 14:44:42 +01:00
read_file( '$today' )
2020-12-10 12:44:07 +01:00
}
2020-12-10 14:44:42 +01:00
2020-12-10 12:44:07 +01:00
fn parse_input( raw: & str) -> Parsed {
unimplemented!( )
2020-12-07 16:17:07 +01:00
}
2020-12-10 12:44:07 +01:00
fn part1( parsed: & Parsed) -> usize {
unimplemented!( )
}
fn part2( parsed: & Parsed) -> usize {
2020-12-07 16:17:07 +01:00
unimplemented!( )
}
fn main( ) {
let input = parse_input( & read_input( ) ) ;
println!( "Part 1: {}" , part1( & input) ) ;
println!( "Part 2: {}" , part2( & input) ) ;
2020-12-05 09:50:09 +01:00
}
#[cfg(test)]
mod tests {
use super::*;
2020-12-10 14:01:25 +01:00
use aoc2020::*;
use paste::paste;
2020-12-05 09:50:09 +01:00
use test::black_box;
2020-12-07 16:17:07 +01:00
const TEST_INPUT: & str = "" ;
2020-12-11 12:04:38 +01:00
test!( part1( ) = = 0) ;
test!( part2( ) = = 0) ;
bench!( part1( ) = = 0) ;
bench!( part2( ) = = 0) ;
2020-12-10 14:01:25 +01:00
bench_input!( len = = 0) ;
2020-12-09 08:57:54 +01:00
} ' > src/bin/day$today .rs