/// Tests for:
/// * functions including trig functions, logs, and functions to powers
/// * implied times/functional call and explicit times/function call
/// * parens
/// These are all intertwined, so they are in one file
use crate::common::*;
#[test]
fn trig_names() {
let expr = "";
test("en", "SimpleSpeak", expr, "sine of x plus cosine of y plus tangent of z plus secant of alpha, plus cosecant of phi, plus cotangent of phi");
}
#[test]
fn hyperbolic_trig_names() {
let expr = "";
test("en", "SimpleSpeak", expr, "hyperbolic sine of x, plus \
hyperbolic cosine of y, plus \
hyperbolic tangent of z, plus \
hyperbolic secant of alpha, plus \
hyperbolic cosecant of phi, plus \
hyperbolic cotangent of phi");
}
#[test]
fn inverse_trig() {
let expr = "";
test("en", "SimpleSpeak", expr, "inverse sine of x");
}
#[test]
fn trig_squared() {
let expr = "";
test("en", "SimpleSpeak", expr, "sine squared of x");
}
#[test]
fn trig_cubed() {
let expr = "";
test("en", "SimpleSpeak", expr, "tangent cubed of x");
}
#[test]
fn trig_fourth() {
let expr = "";
test("en", "SimpleSpeak", expr, "the fourth power of, secant of x");
}
#[test]
fn trig_power_other() {
let expr = "";
test("en", "SimpleSpeak", expr, "the n minus 1 power of, hyperbolic sine of x");
}
#[test]
fn simple_log() {
let expr = "";
test("en", "SimpleSpeak", expr, "log x");
}
#[test]
fn normal_log() {
let expr = "";
test("en", "SimpleSpeak", expr, "the log of, open paren x plus y, close paren");
}
#[test]
fn simple_log_with_base() {
let expr = "";
test("en", "SimpleSpeak", expr, "the log base b of x");
}
#[test]
fn normal_log_with_base() {
let expr = "";
test("en", "SimpleSpeak", expr, "the log base b of, open paren x plus y, close paren");
}
#[test]
fn simple_ln() {
let expr = "";
test("en", "SimpleSpeak", expr, "natural log x");
}
#[test]
fn normal_ln() {
let expr = "";
test("en", "SimpleSpeak", expr, "the natural log of, open paren x plus y, close paren");
}
#[test]
fn normal_ln_terse() {
let expr = "";
test_prefs("en", "SimpleSpeak", vec![("Verbosity", "Terse")],
expr, "l n of, open x plus y close");
}
#[test]
fn simple_ln_terse() {
let expr = "";
test_prefs("en", "SimpleSpeak", vec![("Verbosity", "Terse")],
expr, "l n x");
}
#[test]
fn other_names() {
let expr = "";
test_prefs("en", "SimpleSpeak", vec![("Verbosity", "Terse")],
expr, "Cov x");
test_prefs("en", "SimpleSpeak", vec![("Verbosity", "Medium")],
expr, "covariance x");
let expr = "";
test_prefs("en", "SimpleSpeak", vec![("Verbosity", "Terse")],
expr, "exp x");
test_prefs("en", "SimpleSpeak", vec![("Verbosity", "Medium")],
expr, "exponential of x");
}
#[test]
fn explicit_function_call_with_parens() {
let expr = "";
test("en", "SimpleSpeak", expr, "t of x");
}
#[test]
fn explicit_times_with_parens() {
let expr = "";
test("en", "SimpleSpeak", expr, "t times x");
}
#[test]
fn explicit_function_call() {
let expr = "";
test("en", "SimpleSpeak", expr, "t of x");
}
#[test]
fn explicit_times() {
let expr = "";
test("en", "SimpleSpeak", expr, "t x");
}
/*
* Tests for times
*/
#[test]
fn no_times_binomial() {
let expr = "";
test("en", "SimpleSpeak", expr, "x y");
}
#[test]
fn times_following_paren() {
let expr = "";
test("en", "SimpleSpeak", expr, "2 times 3");
}
#[test]
fn times_preceding_paren() {
let expr = "";
test("en", "SimpleSpeak", expr, "2 times 3");
}
#[test]
fn no_times_sqrt() {
let expr = "";
test("en", "SimpleSpeak", expr,
"the square root of eigh; the square root of b; is equal to, the square root of eigh b end root,");
test_prefs("en", "SimpleSpeak", vec![("Impairment", "LearningDisability")], expr,
"the square root of eigh; the square root of b; is equal to, the square root of eigh b,");
}
/*
* Tests for parens
*/
#[test]
fn no_parens_number() {
let expr = "";
test("en", "SimpleSpeak", expr, "25 times x");
}
#[test]
fn no_parens_monomial() {
let expr = "";
test("en", "SimpleSpeak", expr, "b x y");
}
#[test]
fn no_parens_negative_number() {
let expr = "";
test("en", "SimpleSpeak", expr, "2 plus negative 2");
}
#[test]
fn no_parens_negative_number_with_var() {
let expr = "";
test("en", "SimpleSpeak", expr, "negative 2 x, plus 1");
}
#[test]
fn parens_superscript() {
let expr = "";
test("en", "SimpleSpeak", expr, "open paren 2 x close paren squared");
}
#[test]
fn no_parens_fraction() {
let expr = "";
test("en", "SimpleSpeak", expr, "2 plus 1 half");
}
// Tests for the four types of intervals in SimpleSpeak
#[test]
fn parens_interval_open_open() {
let expr = "";
test("en", "SimpleSpeak",expr, "the open interval from c to d");
}
#[test]
fn parens_interval_closed_open() {
let expr = "";
test("en", "SimpleSpeak",expr, "the closed open interval from c to d");
}
#[test]
fn parens_interval_open_closed() {
let expr = "";
test("en", "SimpleSpeak",expr,"the open closed interval from c to d");
}
#[test]
fn parens_interval_closed_closed() {
let expr = "";
test("en", "SimpleSpeak",expr, "the closed interval from c to d");
}
#[test]
fn parens_interval_neg_infinity_open_open() {
let expr = "";
test("en", "SimpleSpeak",expr,
"the open interval from negative infinity to d");
}
#[test]
fn parens_interval_neg_infinity_open_closed() {
let expr = "";
test("en", "SimpleSpeak",expr,
"the open closed interval from negative infinity to d");
}