use std::cell::RefCell;
use std::rc::Rc;
use super::assets::MemoryCache;
use super::Builder;
fn assert_build(input: &str) {
let cache = MemoryCache::new();
let mut b = Builder::new("<Eval>", Rc::new(RefCell::new(cache)));
b.enable_validate_mode();
b.eval_string(input).unwrap();
if !b.assert_collector.success {
assert!(false, b.assert_collector.failures);
}
}
#[test]
fn test_tuples() {
assert_build(include_str!("../../integration_tests/tuple_test.ucg"));
}
#[test]
fn test_comparisons() {
assert_build(include_str!("../../integration_tests/comparisons_test.ucg"));
}
#[test]
fn test_macros() {
assert_build(include_str!("../../integration_tests/macros_test.ucg"));
}
#[test]
fn test_selectors() {
assert_build(include_str!("../../integration_tests/selectors_test.ucg"));
}
#[test]
fn test_empty_value() {
assert_build(include_str!("../../integration_tests/empty_test.ucg"));
}
#[test]
fn test_select_expressions() {
assert_build(include_str!(
"../../integration_tests/select_expressions_test.ucg"
));
}
#[test]
fn test_binary_operator_precedence() {
assert_build(include_str!(
"../../integration_tests/operator_precedence_test.ucg"
));
}
#[test]
fn test_list_operations() {
assert_build(include_str!("../../integration_tests/list_ops_test.ucg"));
}
#[test]
fn test_concatenation() {
assert_build(include_str!(
"../../integration_tests/concatenation_test.ucg"
));
}
#[test]
fn test_format() {
assert_build(include_str!("../../integration_tests/format_test.ucg"));
}