Added tests to project

This commit is contained in:
Nicholas Novak
2023-09-26 14:55:29 -07:00
parent cef39ef57a
commit 3692f78ba0
4 changed files with 15 additions and 0 deletions
+3
View File
@@ -2,6 +2,9 @@ mod storage;
mod storage_server;
use clap::Parser;
#[cfg(test)]
mod tests;
#[derive(Parser, Debug)]
#[command(author, version, about, long_about = None)]
struct Args {
+3
View File
@@ -14,6 +14,9 @@ struct ChunkSection {
/// section contains a 16 x 16 x 16 cube of blocks = 4096 blocks
/// If the section is empty, this is skipped
block_count: u16,
/// The data for all the blocks in the chunk
/// The representation for this may be different based on the number of
/// non-empty blocks
block_states: [BlockID; 4096],
}
+7
View File
@@ -0,0 +1,7 @@
#[cfg(test)]
mod tests {
#[test]
fn add_one_block() {
assert_eq!(1, 1);
}
}
+2
View File
@@ -0,0 +1,2 @@
mod insert_one;