Skip to content

Commit

Permalink
Remove tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanBrouwer committed Nov 29, 2023
1 parent dedae3d commit cff5339
Show file tree
Hide file tree
Showing 24 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions compiler/src/passes/atomize/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
pub mod atomize;

use crate::passes::parse::types::Type;
use crate::passes::parse::{BinaryOp, Def, Meta, Typed, UnaryOp};
use crate::passes::parse::{BinaryOp, Def, Typed, UnaryOp};
use crate::passes::select::std_lib::Std;
use crate::passes::validate::{DefValidated, ExprValidated, PrgValidated, TLit};
use crate::passes::validate::{TLit};
use crate::utils::gen_sym::UniqueSym;
use std::collections::HashMap;
use crate::passes::select::{Instr, VarArg};
Expand Down
4 changes: 2 additions & 2 deletions compiler/src/passes/patch/patch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl<'p> X86Assigned<'p> {
}
}

fn patch_block<'p>(block: Block<'p, Arg>) -> Block<'p, Arg> {
fn patch_block(block: Block<'_, Arg>) -> Block<'_, Arg> {
Block {
instrs: block
.instrs
Expand All @@ -30,7 +30,7 @@ fn patch_block<'p>(block: Block<'p, Arg>) -> Block<'p, Arg> {
}
}

fn patch_instr<'p>(instr: Instr<Arg, UniqueSym<'p>>) -> Vec<Instr<Arg, UniqueSym<'p>>> {
fn patch_instr(instr: Instr<Arg, UniqueSym<'_>>) -> Vec<Instr<Arg, UniqueSym<'_>>> {
match instr {
Instr::Addq { src, dst } => patch_args(src, dst, |src, dst| addq!(src, dst)),
Instr::Subq { src, dst } => patch_args(src, dst, |src, dst| subq!(src, dst)),
Expand Down
6 changes: 3 additions & 3 deletions compiler/src/passes/reveal/mod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
pub mod reveal;

use crate::passes::parse::{BinaryOp, Def, Meta, Typed, UnaryOp};
use crate::passes::parse::{BinaryOp, Def, Typed, UnaryOp};
use crate::passes::select::std_lib::Std;
use crate::passes::validate::{DefValidated, ExprValidated, PrgValidated, TLit};
use crate::passes::validate::{TLit};
use crate::utils::gen_sym::UniqueSym;
use functor_derive::Functor;

use std::collections::HashMap;
use crate::passes::select::{Instr, VarArg};

Expand Down
2 changes: 1 addition & 1 deletion compiler/src/passes/select/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ fn select_assign<'p>(
}
}

fn select_atom<'p>(expr: Atom<'p>) -> VarArg<UniqueSym<'p>> {
fn select_atom(expr: Atom<'_>) -> VarArg<UniqueSym<'_>> {
match expr {
Atom::Val { val } => imm!(val),
Atom::Var { sym } => var!(sym),
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/passes/validate/constrain/access_field.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::passes::parse::{Constrained, Meta, Span, Spanned, TypeDef};
use crate::passes::parse::{Constrained, Span, Spanned, TypeDef};
use crate::passes::validate::constrain::expr::constrain_expr;
use crate::passes::validate::constrain::uncover_globals::{Env, EnvEntry};
use crate::passes::validate::error::TypeError;
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/passes/validate/constrain/apply.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::passes::parse::{Constrained, Meta, Span, Spanned};
use crate::passes::parse::{Constrained, Span, Spanned};
use crate::passes::validate::constrain::expr;
use crate::passes::validate::constrain::uncover_globals::Env;
use crate::passes::validate::error::TypeError;
Expand Down
6 changes: 3 additions & 3 deletions compiler/src/passes/validate/constrain/asm.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use crate::passes::parse::{Constrained, Span, Spanned};
use crate::passes::select::{Instr, VarArg};
use crate::passes::parse::{Constrained, Span};

use crate::passes::validate::constrain::uncover_globals::Env;
use crate::passes::validate::error::TypeError;
use crate::passes::validate::partial_type::PartialType;
use crate::passes::validate::{ExprConstrained, InstrUniquified, MetaConstrained};
use crate::utils::gen_sym::UniqueSym;


pub fn constrain_asm<'p>(
env: &mut Env<'_, 'p>,
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/passes/validate/constrain/assign.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::passes::parse::{Constrained, Meta, Span, Spanned};
use crate::passes::parse::{Constrained, Span, Spanned};
use crate::passes::validate::constrain::expr;
use crate::passes::validate::constrain::uncover_globals::{Env, EnvEntry};
use crate::passes::validate::error::TypeError;
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/passes/validate/constrain/binary_op.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::passes::parse::{BinaryOp, Constrained, Meta, Span, Spanned};
use crate::passes::parse::{BinaryOp, Constrained, Span, Spanned};
use crate::passes::validate::constrain::expr;
use crate::passes::validate::constrain::uncover_globals::Env;
use crate::passes::validate::error::TypeError;
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/passes/validate/constrain/break.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::passes::parse::{Constrained, Meta, Span, Spanned};
use crate::passes::parse::{Constrained, Span, Spanned};
use crate::passes::validate::constrain::expr;
use crate::passes::validate::constrain::uncover_globals::Env;
use crate::passes::validate::error::TypeError;
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/passes/validate/constrain/continue.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::passes::parse::{Constrained, Meta, Span};
use crate::passes::parse::{Constrained, Span};
use crate::passes::validate::constrain::uncover_globals::Env;
use crate::passes::validate::error::TypeError;
use crate::passes::validate::partial_type::PartialType;
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/passes/validate/constrain/def.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::passes::parse::{Constrained, Def, Meta, Spanned};
use crate::passes::parse::{Def, Spanned};
use crate::passes::validate::constrain::expr::constrain_expr;
use crate::passes::validate::constrain::uncover_globals::{Env, EnvEntry};
use crate::passes::validate::error::TypeError;
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/passes/validate/constrain/expr.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::passes::parse::{Constrained, Expr, Spanned};
use crate::passes::validate::constrain::access_field::constrain_access_field;
use crate::passes::validate::constrain::apply::constrain_apply;
use crate::passes::validate::constrain::asm;

use crate::passes::validate::constrain::asm::constrain_asm;
use crate::passes::validate::constrain::assign::constrain_assign;
use crate::passes::validate::constrain::binary_op::constrain_binary_op;
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/passes/validate/constrain/if.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::passes::parse::types::Type;
use crate::passes::parse::{Constrained, Meta, Span, Spanned};
use crate::passes::parse::{Constrained, Span, Spanned};
use crate::passes::validate::constrain::expr;
use crate::passes::validate::constrain::uncover_globals::Env;
use crate::passes::validate::error::TypeError;
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/passes/validate/constrain/let.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::passes::parse::types::Type;
use crate::passes::parse::{Constrained, Meta, Span, Spanned};
use crate::passes::parse::{Constrained, Span, Spanned};
use crate::passes::validate::constrain::expr;
use crate::passes::validate::constrain::uncover_globals::{Env, EnvEntry};
use crate::passes::validate::error::TypeError;
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/passes/validate/constrain/lit.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::passes::parse::{Constrained, Lit, Meta, Span};
use crate::passes::parse::{Constrained, Lit, Span};
use crate::passes::validate::constrain::uncover_globals::Env;
use crate::passes::validate::error::TypeError;
use crate::passes::validate::partial_type::PartialType;
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/passes/validate/constrain/loop.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::passes::parse::{Constrained, Meta, Span, Spanned};
use crate::passes::parse::{Constrained, Span, Spanned};
use crate::passes::validate::constrain::expr;
use crate::passes::validate::constrain::uncover_globals::Env;
use crate::passes::validate::error::TypeError;
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/passes/validate/constrain/return.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::passes::parse::{Constrained, Meta, Span, Spanned};
use crate::passes::parse::{Constrained, Span, Spanned};
use crate::passes::validate::constrain::expr;
use crate::passes::validate::constrain::uncover_globals::Env;
use crate::passes::validate::error::TypeError;
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/passes/validate/constrain/seq.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::passes::parse::{Constrained, Meta, Span, Spanned};
use crate::passes::parse::{Constrained, Span, Spanned};
use crate::passes::validate::constrain::expr;
use crate::passes::validate::constrain::uncover_globals::Env;
use crate::passes::validate::error::TypeError;
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/passes/validate/constrain/struct.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::passes::parse::{Constrained, Meta, Span, Spanned, TypeDef};
use crate::passes::parse::{Constrained, Span, Spanned, TypeDef};
use crate::passes::validate::constrain::expr;
use crate::passes::validate::constrain::uncover_globals::{Env, EnvEntry};
use crate::passes::validate::error::TypeError;
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/passes/validate/constrain/unary_op.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::passes::parse::types::Type;
use crate::passes::parse::{Constrained, Meta, Span, Spanned, UnaryOp};
use crate::passes::parse::{Constrained, Span, Spanned, UnaryOp};
use crate::passes::validate::constrain::expr;
use crate::passes::validate::constrain::uncover_globals::Env;
use crate::passes::validate::error::TypeError;
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/passes/validate/constrain/var.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::passes::parse::{Constrained, Meta, Span, Spanned};
use crate::passes::parse::{Constrained, Span, Spanned};
use crate::passes::validate::constrain::uncover_globals::{Env, EnvEntry};
use crate::passes::validate::error::TypeError;
use crate::passes::validate::{ExprConstrained, MetaConstrained};
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/passes/validate/resolve.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::passes::parse::types::Type;
use crate::passes::parse::{Constrained, Expr, Lit, Meta, Param, Spanned, TypeDef, Typed, InstrParsed};
use crate::passes::parse::{Constrained, Expr, Lit, Meta, Param, Spanned, TypeDef, Typed};
use crate::passes::validate::error::TypeError;
use crate::passes::validate::partial_type::PartialType;
use crate::passes::validate::{
Expand Down
4 changes: 2 additions & 2 deletions compiler/src/passes/validate/tests.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use crate::interpreter::TestIO;

use crate::passes::parse::parse::parse_program;
use crate::utils::split_test::split_test;
use derive_name::VariantName;
use miette::{NamedSource, Report};
use test_each_file::test_each_file;

fn validate([test]: [&str; 1], good: bool) {
let (input, expected_output, expected_return, expected_error) = split_test(test);
let (_input, _expected_output, _expected_return, expected_error) = split_test(test);
assert_eq!(good, expected_error.is_none());

let result = parse_program(test).unwrap().validate();
Expand Down

0 comments on commit cff5339

Please sign in to comment.