Added tests to project
This commit is contained in:
parent
cef39ef57a
commit
3692f78ba0
@ -2,6 +2,9 @@ mod storage;
|
|||||||
mod storage_server;
|
mod storage_server;
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests;
|
||||||
|
|
||||||
#[derive(Parser, Debug)]
|
#[derive(Parser, Debug)]
|
||||||
#[command(author, version, about, long_about = None)]
|
#[command(author, version, about, long_about = None)]
|
||||||
struct Args {
|
struct Args {
|
||||||
|
@ -14,6 +14,9 @@ struct ChunkSection {
|
|||||||
/// section contains a 16 x 16 x 16 cube of blocks = 4096 blocks
|
/// section contains a 16 x 16 x 16 cube of blocks = 4096 blocks
|
||||||
/// If the section is empty, this is skipped
|
/// If the section is empty, this is skipped
|
||||||
block_count: u16,
|
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],
|
block_states: [BlockID; 4096],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
7
src/tests/insert_one.rs
Normal file
7
src/tests/insert_one.rs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
#[test]
|
||||||
|
fn add_one_block() {
|
||||||
|
assert_eq!(1, 1);
|
||||||
|
}
|
||||||
|
}
|
2
src/tests/mod.rs
Normal file
2
src/tests/mod.rs
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
mod insert_one;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user