test optimization
parent
fd9f5ded28
commit
eda7d043f9
|
@ -8,6 +8,7 @@ debug/
|
||||||
target/
|
target/
|
||||||
# Generated files
|
# Generated files
|
||||||
/target/
|
/target/
|
||||||
|
target/
|
||||||
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
|
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
|
||||||
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
|
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
|
||||||
Cargo.lock
|
Cargo.lock
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"rustc_fingerprint":8779373148605506356,"outputs":{"17598535894874457435":{"success":true,"status":"","code":0,"stdout":"rustc 1.54.0 (a178d0322 2021-07-26)\nbinary: rustc\ncommit-hash: a178d0322ce20e33eac124758e837cbd80a6f633\ncommit-date: 2021-07-26\nhost: x86_64-unknown-linux-gnu\nrelease: 1.54.0\nLLVM version: 12.0.1\n","stderr":""},"2797684049618456168":{"success":false,"status":"exit status: 1","code":1,"stdout":"","stderr":"error: `-Csplit-debuginfo` is unstable on this platform\n\n"},"931469667778813386":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/mace/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\ndebug_assertions\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}}
|
{"rustc_fingerprint":7489809454134039525,"outputs":{"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/mace/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""},"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.71.0 (8ede3aae2 2023-07-12)\nbinary: rustc\ncommit-hash: 8ede3aae28fe6e4d52b38157d7bfe0d3bceef225\ncommit-date: 2023-07-12\nhost: x86_64-unknown-linux-gnu\nrelease: 1.71.0\nLLVM version: 16.0.5\n","stderr":""}},"successes":{}}
|
|
@ -6,7 +6,7 @@ mod tests {
|
||||||
|
|
||||||
fn get_reader() -> BufReader<File> {
|
fn get_reader() -> BufReader<File> {
|
||||||
let path = Path::new("./assets/csv1.csv");
|
let path = Path::new("./assets/csv1.csv");
|
||||||
assert_eq!(path.is_file(), true);
|
assert!(path.is_file());
|
||||||
let file = File::open(path);
|
let file = File::open(path);
|
||||||
match file {
|
match file {
|
||||||
Ok(_) => BufReader::new(file.unwrap()),
|
Ok(_) => BufReader::new(file.unwrap()),
|
||||||
|
@ -19,6 +19,6 @@ mod tests {
|
||||||
let reader = get_reader();
|
let reader = get_reader();
|
||||||
let mut vec1: Vec<CsvLine> = Vec::new();
|
let mut vec1: Vec<CsvLine> = Vec::new();
|
||||||
load_vector(&mut vec1, reader);
|
load_vector(&mut vec1, reader);
|
||||||
assert_eq!(3, vec1.iter().count());
|
assert_eq!(3, vec1.len());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue