Use default rust directory structure for tests

This commit is contained in:
Juan Ibiapina 2018-06-13 10:56:29 +02:00
parent 59c60c43d1
commit e534e907e8
28 changed files with 89 additions and 66 deletions

View File

@ -47,9 +47,6 @@ mod engine;
mod fn_register; mod fn_register;
mod parser; mod parser;
#[cfg(test)]
mod tests;
pub use any::Any; pub use any::Any;
pub use engine::{Engine, EvalAltResult, Scope}; pub use engine::{Engine, EvalAltResult, Scope};
pub use fn_register::RegisterFn; pub use fn_register::RegisterFn;

View File

@ -1,26 +0,0 @@
mod arrays;
mod binary_ops;
mod bit_shift;
mod bool_op;
mod chars;
mod comments;
mod compound_equality;
mod decrement;
mod float;
mod get_set;
mod if_block;
mod increment;
mod internal_fn;
mod looping;
mod method_call;
mod mismatched_op;
mod not;
mod number_literals;
mod ops;
mod power_of;
mod string;
mod unary_after_binary;
mod unary_minus;
mod unit;
mod var_scope;
mod while_loop;

View File

@ -1,5 +1,7 @@
use engine::Engine; extern crate rhai;
use fn_register::RegisterFn;
use rhai::Engine;
use rhai::RegisterFn;
#[test] #[test]
fn test_arrays() { fn test_arrays() {

View File

@ -1,4 +1,6 @@
use engine::Engine; extern crate rhai;
use rhai::Engine;
#[test] #[test]
fn test_binary_ops() { fn test_binary_ops() {

View File

@ -1,4 +1,6 @@
use engine::Engine; extern crate rhai;
use rhai::Engine;
#[test] #[test]
fn test_left_shift() { fn test_left_shift() {

View File

@ -1,4 +1,6 @@
use engine::Engine; extern crate rhai;
use rhai::Engine;
#[test] #[test]
fn test_bool_op1() { fn test_bool_op1() {

View File

@ -1,4 +1,6 @@
use engine::Engine; extern crate rhai;
use rhai::Engine;
#[test] #[test]
fn test_chars() { fn test_chars() {

View File

@ -1,4 +1,6 @@
use engine::Engine; extern crate rhai;
use rhai::Engine;
#[test] #[test]
fn test_comments() { fn test_comments() {

View File

@ -1,4 +1,6 @@
use engine::Engine; extern crate rhai;
use rhai::Engine;
#[test] #[test]
fn test_or_equals() { fn test_or_equals() {

View File

@ -1,4 +1,6 @@
use engine::Engine; extern crate rhai;
use rhai::Engine;
#[test] #[test]
fn test_decrement() { fn test_decrement() {

View File

@ -1,5 +1,7 @@
use engine::Engine; extern crate rhai;
use fn_register::RegisterFn;
use rhai::Engine;
use rhai::RegisterFn;
#[test] #[test]
fn test_float() { fn test_float() {

View File

@ -1,5 +1,7 @@
use engine::Engine; extern crate rhai;
use fn_register::RegisterFn;
use rhai::Engine;
use rhai::RegisterFn;
#[test] #[test]
fn test_get_set() { fn test_get_set() {

View File

@ -1,4 +1,6 @@
use engine::Engine; extern crate rhai;
use rhai::Engine;
#[test] #[test]
fn test_if() { fn test_if() {

View File

@ -1,4 +1,6 @@
use engine::Engine; extern crate rhai;
use rhai::Engine;
#[test] #[test]
fn test_increment() { fn test_increment() {

View File

@ -1,4 +1,6 @@
use engine::Engine; extern crate rhai;
use rhai::Engine;
#[test] #[test]
fn test_internal_fn() { fn test_internal_fn() {

View File

@ -1,4 +1,6 @@
use engine::Engine; extern crate rhai;
use rhai::Engine;
#[test] #[test]
fn test_loop() { fn test_loop() {

View File

@ -1,5 +1,7 @@
use engine::Engine; extern crate rhai;
use fn_register::RegisterFn;
use rhai::Engine;
use rhai::RegisterFn;
#[test] #[test]
fn test_method_call() { fn test_method_call() {

View File

@ -1,4 +1,6 @@
use engine::{Engine, EvalAltResult}; extern crate rhai;
use rhai::{Engine, EvalAltResult};
#[test] #[test]
fn test_mismatched_op() { fn test_mismatched_op() {

View File

@ -1,4 +1,6 @@
use engine::Engine; extern crate rhai;
use rhai::Engine;
#[test] #[test]
fn test_not() { fn test_not() {

View File

@ -1,4 +1,6 @@
use engine::Engine; extern crate rhai;
use rhai::Engine;
#[test] #[test]
fn test_number_literal() { fn test_number_literal() {

View File

@ -1,4 +1,6 @@
use engine::Engine; extern crate rhai;
use rhai::Engine;
#[test] #[test]
fn test_ops() { fn test_ops() {

View File

@ -1,4 +1,6 @@
use engine::Engine; extern crate rhai;
use rhai::Engine;
#[test] #[test]
fn test_power_of() { fn test_power_of() {

View File

@ -1,4 +1,6 @@
use engine::Engine; extern crate rhai;
use rhai::Engine;
#[test] #[test]
fn test_string() { fn test_string() {

View File

@ -1,4 +1,6 @@
use engine::Engine; extern crate rhai;
use rhai::Engine;
#[test] #[test]
// TODO also add test case for unary after compound // TODO also add test case for unary after compound

View File

@ -1,4 +1,6 @@
use engine::Engine; extern crate rhai;
use rhai::Engine;
#[test] #[test]
fn test_unary_minus() { fn test_unary_minus() {

View File

@ -1,4 +1,6 @@
use engine::Engine; extern crate rhai;
use rhai::Engine;
#[test] #[test]
fn test_unit() { fn test_unit() {

View File

@ -1,4 +1,6 @@
use engine::{Engine, Scope}; extern crate rhai;
use rhai::{Engine, Scope};
#[test] #[test]
fn test_var_scope() { fn test_var_scope() {

View File

@ -1,4 +1,6 @@
use engine::Engine; extern crate rhai;
use rhai::Engine;
#[test] #[test]
fn test_while() { fn test_while() {