Files @ b4a9c41d70da
Branch filter:

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

b4a9c41d70da 610 B application/rls-services+xml Show Annotation Show as Raw Download as Raw
MH
Initial casting implementation

Explicit casts can be performed with the syntax 'cast<type>(input)'
and implicit casts can be performed with the syntax 'cast(input)'
where the output type is determined by inference.

To prevent casting shenanigans we only allow casting of primitive
types and of types to themselves (essentially creating a copy).
/**
 * 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.
 */

mod utils;
mod lexer;
mod parser_validation;
mod parser_inference;
mod parser_monomorphs;
mod parser_imports;
mod eval_operators;
mod eval_calls;
mod eval_casting;
mod eval_silly;

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