Files @ 031c9d14adaa
Branch filter:

Location: CSY/reowolf/src/protocol/tests/mod.rs

031c9d14adaa 837 B application/rls-services+xml Show Annotation Show as Raw Download as Raw
MH
Merge branch 'feat-bytecode'

Adds size/alignment/offset computations to the type system and detects
potentially infinite types. If the type is potentially infinite but
contains a union that can break that type loop, then all other variants
of that union are supposed to be allocated on the heap. If the type
is potentially infinite but cannot be broken up, then we throw the
appropriate error.

The size/alignment/offset computations are not yet employed in the
runtime. But prepares Reowolf for a proper bytecode/IR implementation.
/**
 * protocol/tests.rs
 *
 * Contains tests for various parts of the lexer/parser and the evaluator of the
 * code. These are intended to be temporary tests such that we're sure that we
 * don't break existing functionality.
 *
 * In the future these should be replaced by proper testing protocols.
 *
 * If any of these tests fail, and you think they're not needed anymore, feel
 * free to cast them out into oblivion, where dead code goes to die.
 */

mod utils;
mod lexer;
mod parser_binding;
mod parser_imports;
mod parser_inference;
mod parser_literals;
mod parser_monomorphs;
mod parser_types;
mod parser_validation;
mod eval_binding;
mod eval_calls;
mod eval_casting;
mod eval_operators;
mod eval_silly;

pub(crate) use utils::{Tester}; // the testing harness
pub(crate) use crate::protocol::eval::value::*; // to test functions