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::error::get_line_and_column;
use super::position::get_line_and_column;
#[test]
@ -84,7 +83,7 @@ fn line_and_col_test() {
fn sexp_size() {
// I just want to see when this changes, in the diff.
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]

@ -15,7 +15,7 @@ use super::parse_op::parse_op;
use std::path::{PathBuf};
use std::convert::TryFrom;
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> {
let mut parsed: Vec<Box<dyn Flatten>> = vec![];

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

Loading…
Cancel
Save