change headers

This commit is contained in:
Folkert 2021-03-01 15:15:05 +01:00
parent 3e3fe4fc7a
commit ef362ada26
11 changed files with 4402 additions and 4487 deletions

View file

@ -1,18 +1,8 @@
#[macro_use]
extern crate pretty_assertions;
#[macro_use]
extern crate indoc;
#![cfg(test)]
extern crate bumpalo;
extern crate inkwell;
extern crate libc;
extern crate roc_gen;
#[macro_use]
mod helpers;
#[cfg(test)]
mod gen_dict {
use crate::assert_evals_to;
use crate::assert_llvm_evals_to;
use indoc::indoc;
use roc_std::RocStr;
#[test]
@ -519,4 +509,3 @@ mod gen_dict {
i64
);
}
}

View file

@ -1,18 +1,8 @@
#[macro_use]
extern crate pretty_assertions;
#[macro_use]
extern crate indoc;
#![cfg(test)]
extern crate bumpalo;
extern crate inkwell;
extern crate libc;
extern crate roc_gen;
#[macro_use]
mod helpers;
#[cfg(test)]
mod gen_hash {
use crate::assert_evals_to;
use crate::assert_llvm_evals_to;
use indoc::indoc;
#[test]
fn basic_hash() {
@ -154,4 +144,3 @@ mod gen_hash {
u64
);
}
}

View file

@ -1,19 +1,9 @@
#[macro_use]
extern crate pretty_assertions;
#[macro_use]
extern crate indoc;
#![cfg(test)]
extern crate bumpalo;
extern crate inkwell;
extern crate libc;
extern crate roc_gen;
#[macro_use]
mod helpers;
#[cfg(test)]
mod gen_list {
use crate::assert_evals_to;
use crate::assert_llvm_evals_to;
use crate::helpers::with_larger_debug_stack;
use indoc::indoc;
use roc_std::{RocList, RocStr};
#[test]
@ -628,8 +618,8 @@ mod gen_list {
"#
),
RocList::from_slice(&[
1.2, 1.1, 2.1, 2.2, 3.0, 4.0, 5.0, 6.1, 9.0, 3.0, 4.0, 5.0, 6.1, 9.0, 3.0, 4.0,
5.0, 6.1, 9.0, 3.0, 4.0, 5.0, 6.1, 9.0, 3.0, 4.0, 5.0, 6.1, 9.0
1.2, 1.1, 2.1, 2.2, 3.0, 4.0, 5.0, 6.1, 9.0, 3.0, 4.0, 5.0, 6.1, 9.0, 3.0, 4.0, 5.0,
6.1, 9.0, 3.0, 4.0, 5.0, 6.1, 9.0, 3.0, 4.0, 5.0, 6.1, 9.0
]),
RocList<f64>
);
@ -1752,4 +1742,3 @@ mod gen_list {
RocList<bool>
);
}
}

View file

@ -1,18 +1,8 @@
#[macro_use]
extern crate pretty_assertions;
#[macro_use]
extern crate indoc;
extern crate bumpalo;
extern crate inkwell;
extern crate libc;
extern crate roc_gen;
#[macro_use]
mod helpers;
#[cfg(test)]
mod gen_num {
use crate::assert_evals_to;
use crate::assert_llvm_evals_to;
use indoc::indoc;
use roc_std::RocOrder;
#[test]

View file

@ -1,18 +1,9 @@
#[macro_use]
extern crate pretty_assertions;
#[macro_use]
extern crate indoc;
#![cfg(test)]
extern crate bumpalo;
extern crate inkwell;
extern crate libc;
extern crate roc_gen;
use crate::assert_evals_to;
use crate::assert_llvm_evals_to;
use indoc::indoc;
#[macro_use]
mod helpers;
#[cfg(test)]
mod gen_records {
#[test]
fn basic_record() {
assert_evals_to!(
@ -893,4 +884,3 @@ mod gen_records {
i64
);
}
}

View file

@ -1,18 +1,8 @@
#[macro_use]
extern crate pretty_assertions;
#[macro_use]
extern crate indoc;
#![cfg(test)]
extern crate bumpalo;
extern crate inkwell;
extern crate libc;
extern crate roc_gen;
#[macro_use]
mod helpers;
#[cfg(test)]
mod gen_result {
use crate::assert_evals_to;
use crate::assert_llvm_evals_to;
use indoc::indoc;
#[test]
fn with_default() {
@ -108,4 +98,3 @@ mod gen_result {
i64
);
}
}

View file

@ -1,18 +1,8 @@
#[macro_use]
extern crate pretty_assertions;
#[macro_use]
extern crate indoc;
#![cfg(test)]
extern crate bumpalo;
extern crate inkwell;
extern crate libc;
extern crate roc_gen;
#[macro_use]
mod helpers;
#[cfg(test)]
mod gen_set {
use crate::assert_evals_to;
use crate::assert_llvm_evals_to;
use indoc::indoc;
#[test]
fn empty_len() {
@ -245,4 +235,3 @@ mod gen_set {
&[i64]
);
}
}

View file

@ -1,26 +1,13 @@
#[macro_use]
extern crate pretty_assertions;
#[macro_use]
extern crate indoc;
#![cfg(test)]
extern crate bumpalo;
extern crate inkwell;
extern crate libc;
extern crate roc_gen;
use roc_std::RocStr;
#[macro_use]
mod helpers;
const ROC_STR_MEM_SIZE: usize = core::mem::size_of::<RocStr>();
#[cfg(test)]
mod gen_str {
use crate::ROC_STR_MEM_SIZE;
use crate::assert_evals_to;
use crate::assert_llvm_evals_to;
use indoc::indoc;
use roc_std::RocStr;
use std::cmp::min;
const ROC_STR_MEM_SIZE: usize = core::mem::size_of::<RocStr>();
fn small_str(str: &str) -> [u8; ROC_STR_MEM_SIZE] {
let mut bytes: [u8; ROC_STR_MEM_SIZE] = Default::default();
@ -823,10 +810,9 @@ mod gen_str {
assert_evals_to!(
r#"Str.toBytes "this is a long string""#,
&[
116, 104, 105, 115, 32, 105, 115, 32, 97, 32, 108, 111, 110, 103, 32, 115, 116,
114, 105, 110, 103
116, 104, 105, 115, 32, 105, 115, 32, 97, 32, 108, 111, 110, 103, 32, 115, 116, 114,
105, 110, 103
],
&[u8]
);
}
}

View file

@ -1,11 +1,5 @@
extern crate bumpalo;
extern crate inkwell;
extern crate libc;
extern crate roc_gen;
#![cfg(test)]
#[cfg(test)]
mod gen_tags {
#[macro_use]
use crate::assert_evals_to;
use crate::assert_llvm_evals_to;
use indoc::indoc;
@ -980,4 +974,3 @@ mod gen_tags {
|x: &i64| *x
);
}
}

View file

@ -29,6 +29,9 @@ pub fn test_builtin_defs(symbol: Symbol, var_store: &mut VarStore) -> Option<Def
}
}
// this is not actually dead code, but only used by cfg_test modules
// so "normally" it is dead, only at testing time is it used
#[allow(dead_code)]
pub fn helper<'a>(
arena: &'a bumpalo::Bump,
src: &str,

View file

@ -4,6 +4,14 @@
// we actually want to compare against the literal float bits
#![allow(clippy::clippy::float_cmp)]
pub mod gen_tags;
pub mod gen_dict;
pub mod gen_hash;
pub mod gen_list;
pub mod gen_num;
pub mod gen_primitives;
pub mod gen_records;
pub mod gen_result;
pub mod gen_set;
pub mod gen_str;
pub mod gen_tags;
mod helpers;