fix tests and warnings

master
Ondřej Hruška 4 years ago
parent df8bfa91a2
commit 169c003980
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 3
      crsn/crsn-sexp/src/test.rs
  2. 2
      crsn/src/asm/parse/parse_instr.rs
  3. 6
      crsn/src/builtin/parse.rs

@ -1,5 +1,4 @@
use super::*; use super::*;
use super::error::get_line_and_column;
use super::position::get_line_and_column; use super::position::get_line_and_column;
#[test] #[test]
@ -84,7 +83,7 @@ fn line_and_col_test() {
fn sexp_size() { fn sexp_size() {
// I just want to see when this changes, in the diff. // I just want to see when this changes, in the diff.
use std::mem; use std::mem;
assert_eq!(mem::size_of::<Sexp>(), mem::size_of::<isize>() * 6); assert_eq!(mem::size_of::<Sexp>(), mem::size_of::<isize>() * 7);
} }
#[test] #[test]

@ -15,7 +15,7 @@ use super::parse_op::parse_op;
use std::path::{PathBuf}; use std::path::{PathBuf};
use std::convert::TryFrom; use std::convert::TryFrom;
use crate::asm::read_source_file; use crate::asm::read_source_file;
use crate::asm::instr::flatten::jumps_to_skips;
pub fn parse_instructions(items: impl Iterator<Item=Sexp>, pos: &SourcePosition, pcx: &ParserContext) -> Result<Box<dyn Flatten>, CrsnError> { pub fn parse_instructions(items: impl Iterator<Item=Sexp>, pos: &SourcePosition, pcx: &ParserContext) -> Result<Box<dyn Flatten>, CrsnError> {
let mut parsed: Vec<Box<dyn Flatten>> = vec![]; let mut parsed: Vec<Box<dyn Flatten>> = vec![];

@ -590,7 +590,7 @@ mod test {
let ti = Arc::new(ThreadInfo { let ti = Arc::new(ThreadInfo {
id: ThreadToken(0), id: ThreadToken(0),
uniq: Default::default(), uniq: Default::default(),
program: Program::new(vec![], parsers.clone()).unwrap(), program: Program::new(vec![], parsers.clone(), vec![]).unwrap(),
cycle_time: Default::default(), cycle_time: Default::default(),
scheduler_interval: Default::default(), scheduler_interval: Default::default(),
extensions: parsers.clone(), extensions: parsers.clone(),
@ -617,7 +617,9 @@ mod test {
}, },
const_eval_ti: ti.clone(), const_eval_ti: ti.clone(),
parsing_expr: false, parsing_expr: false,
label_num: Default::default() label_num: Default::default(),
files: vec![],
active_file: 0
}), }),
}; };

Loading…
Cancel
Save