/// 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("fi", "SimpleSpeak", expr, "sini arvolla x, plus kosini arvolla y, plus tangentti arvolla z, plus sekantti arvolla alfa, plus, kosekantti arvolla suora fii, plus kotangentti arvolla fii");
}
#[test]
fn hyperbolic_trig_names() {
let expr = "";
test("fi", "SimpleSpeak", expr, "hyperbolinen sini arvolla x, plus, hyperbolinen kosini arvolla y, plus, hyperbolinen tangentti, arvolla z, plus, hyperbolinen sekantti, arvolla alfa; plus, hyperbolinen kosekantti, arvolla suora fii; plus, hyperbolinen kotangentti, arvolla fii");
}
#[test]
fn inverse_trig() {
let expr = "";
test("fi", "SimpleSpeak", expr, "käänteis sini arvolla x");
}
#[test]
fn trig_squared() {
let expr = "";
test("fi", "SimpleSpeak", expr, "sini toiseen arvolla x");
}
#[test]
fn trig_cubed() {
let expr = "";
test("fi", "SimpleSpeak", expr, "tangentti kolmanteen arvolla x");
}
#[test]
fn trig_fourth() {
let expr = "";
test("fi", "SimpleSpeak", expr, "sekantti potenssiin 4, arvolla x");
}
#[test]
fn trig_power_other() {
let expr = "";
test("fi", "SimpleSpeak", expr, "hyperbolinen sini potenssiin n miinus 1; arvolla x");
}
#[test]
fn simple_log() {
let expr = "";
test("fi", "SimpleSpeak", expr, "log x");
}
#[test]
fn normal_log() {
let expr = "";
test("fi", "SimpleSpeak", expr, "log, auki sulku x plus y, kiinni sulku");
}
#[test]
fn simple_lg() {
let expr = "";
test("fi", "SimpleSpeak", expr, "kymmenkantainen logaritmi x");
test_prefs("fi", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "l g x");
}
#[test]
fn normal_lg() {
let expr = "";
test("fi", "SimpleSpeak", expr, "l g, auki sulku x plus y, kiinni sulku");
test_prefs("fi", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "l g, auki x plus y kiinni");
}
#[test]
fn simple_log_with_base() {
let expr = "";
test("fi", "SimpleSpeak", expr, "log kanta b arvolla x");
}
#[test]
fn normal_log_with_base() {
let expr = "";
test("fi", "SimpleSpeak", expr, "log kanta b arvolla, auki sulku x plus y, kiinni sulku");
}
#[test]
fn simple_ln() {
let expr = "";
test("fi", "SimpleSpeak", expr, "luonnollinen log x");
}
#[test]
fn normal_ln() {
let expr = "";
test("fi", "SimpleSpeak", expr, "luonnollinen logaritmi, auki sulku x plus y, kiinni sulku");
}
#[test]
fn normal_ln_terse() {
let expr = "";
test_prefs("fi", "SimpleSpeak", vec![("Verbosity", "Terse")],
expr, "l n, auki x plus y kiinni");
}
#[test]
fn simple_ln_terse() {
let expr = "";
test_prefs("fi", "SimpleSpeak", vec![("Verbosity", "Terse")],
expr, "l n x");
}
#[test]
fn explicit_function_call_with_parens() {
let expr = "";
test("fi", "SimpleSpeak", expr, "t arvolla x");
}
#[test]
fn explicit_times_with_parens() {
let expr = "";
test("fi", "SimpleSpeak", expr, "t kertaa x");
}
#[test]
fn explicit_function_call() {
let expr = "";
test("fi", "SimpleSpeak", expr, "t arvolla x");
}
#[test]
fn explicit_times() {
let expr = "";
test("fi", "SimpleSpeak", expr, "t x");
}
/*
* Tests for times
*/
#[test]
fn no_times_binomial() {
let expr = "";
test("fi", "SimpleSpeak", expr, "x y");
}
#[test]
fn times_following_paren() {
let expr = "";
test("fi", "SimpleSpeak", expr, "2 kertaa 3");
}
#[test]
fn times_preceding_paren() {
let expr = "";
test("fi", "SimpleSpeak", expr, "2 kertaa 3");
}
#[test]
fn no_times_sqrt() {
let expr = "";
test("fi", "SimpleSpeak", expr,
"neliöjuuri a, neliöjuuri b; on yhtä suuri kuin, neliöjuuri a b loppu juuri,");
}
/*
* Tests for parens
*/
#[test]
fn no_parens_number() {
let expr = "";
test("fi", "SimpleSpeak", expr, "25 kertaa x");
}
#[test]
fn no_parens_monomial() {
let expr = "";
test("fi", "SimpleSpeak", expr, "b x y");
}
#[test]
fn no_parens_negative_number() {
let expr = "";
test("fi", "SimpleSpeak", expr, "2 plus negatiivinen 2");
}
#[test]
fn no_parens_negative_number_with_var() {
let expr = "";
test("fi", "SimpleSpeak", expr, "negatiivinen 2 x, plus 1");
}
#[test]
fn parens_superscript() {
let expr = "";
test("fi", "SimpleSpeak", expr, "auki sulku 2 x kiinni sulku toiseen");
}
#[test]
fn no_parens_fraction() {
let expr = "";
test("fi", "SimpleSpeak", expr, "2 plus 1 kahdesosa");
}
// Tests for the four types of intervals in SimpleSpeak
#[test]
fn parens_interval_open_open() {
let expr = "";
test("fi", "SimpleSpeak",expr, "avoin väli luvusta c lukuun d");
}
#[test]
fn parens_interval_closed_open() {
let expr = "";
test("fi", "SimpleSpeak",expr, "oikealta puoliavoin väli luvusta c lukuun d");
}
#[test]
fn parens_interval_open_closed() {
let expr = "";
test("fi", "SimpleSpeak",expr,"vasemmalta puoliavoin väli luvusta c lukuun d");
}
#[test]
fn parens_interval_closed_closed() {
let expr = "";
test("fi", "SimpleSpeak",expr, "suljettu väli luvusta c lukuun d");
}
#[test]
fn parens_interval_neg_infinity_open_open() {
let expr = "";
test("fi", "SimpleSpeak",expr,
"avoin väli luvusta negatiivinen ääretön lukuun d");
}
#[test]
fn parens_interval_neg_infinity_open_closed() {
let expr = "";
test("fi", "SimpleSpeak",expr,
"vasemmalta puoliavoin väli luvusta negatiivinen ääretön lukuun d");
}