/// 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("sv", "SimpleSpeak", expr, "sinus av x plus cosinus av y plus tangens av z plus sekans av alfa, plus cosekans av fi, plus cotangens av fi");
}
#[test]
fn hyperbolic_trig_names() {
let expr = "";
test("sv", "SimpleSpeak", expr, "sinus hyperbolicus av x, plus \
cosinus hyperbolicus av y, plus \
tangens hyperbolicus av z, plus \
sekans hyperbolicus av alfa, plus \
cosekans hyperbolicus av fi, plus \
cotangens hyperbolicus av fi");
}
#[test]
fn inverse_trig() {
let expr = "";
test("sv", "SimpleSpeak", expr, "invers sinus av x");
}
#[test]
fn trig_squared() {
let expr = "";
test("sv", "SimpleSpeak", expr, "sinus kvadrat av x");
}
#[test]
fn trig_cubed() {
let expr = "";
test("sv", "SimpleSpeak", expr, "tangens kubik av x");
}
#[test]
fn trig_fourth() {
let expr = "";
test("sv", "SimpleSpeak", expr, "sekans upphöjt till 4, av x");
}
#[test]
fn trig_power_other() {
let expr = "";
test("sv", "SimpleSpeak", expr, "sinus hyperbolicus upphöjt till n minus 1, av x");
}
#[test]
fn simple_log() {
let expr = "";
test("sv", "SimpleSpeak", expr, "logg x");
}
#[test]
fn normal_log() {
let expr = "";
test("sv", "SimpleSpeak", expr, "logg av, vänster-parentes; x plus y; höger-parentes");
}
#[test]
fn simple_log_with_base() {
let expr = "";
test("sv", "SimpleSpeak", expr, "logaritmen med bas b av x");
}
#[test]
fn normal_log_with_base() {
let expr = "";
test("sv", "SimpleSpeak", expr, "logaritmen med bas b av, vänster-parentes; x plus y; höger-parentes");
}
#[test]
fn simple_ln() {
let expr = "";
test("sv", "SimpleSpeak", expr, "l n x");
}
#[test]
fn normal_ln() {
let expr = "";
test("sv", "SimpleSpeak", expr, "naturliga logaritmen av, vänster-parentes; x plus y; höger-parentes");
}
#[test]
fn normal_ln_terse() {
let expr = "";
test_prefs("sv", "SimpleSpeak", vec![("Verbosity", "Terse")],
expr, "l n av, start-parentes; x plus y; slut-parentes");
}
#[test]
fn simple_ln_terse() {
let expr = "";
test_prefs("sv", "SimpleSpeak", vec![("Verbosity", "Terse")],
expr, "l n x");
}
#[test]
fn explicit_function_call_with_parens() {
let expr = "";
test("sv", "SimpleSpeak", expr, "t av x");
}
#[test]
fn explicit_times_with_parens() {
let expr = "";
test("sv", "SimpleSpeak", expr, "t gånger x");
}
#[test]
fn explicit_function_call() {
let expr = "";
test("sv", "SimpleSpeak", expr, "t av x");
}
#[test]
fn explicit_times() {
let expr = "";
test("sv", "SimpleSpeak", expr, "t x");
}
/*
* Tests for times
*/
#[test]
fn no_times_binomial() {
let expr = "";
test("sv", "SimpleSpeak", expr, "x y");
}
#[test]
fn times_following_paren() {
let expr = "";
test("sv", "SimpleSpeak", expr, "2 gånger 3");
}
#[test]
fn times_preceding_paren() {
let expr = "";
test("sv", "SimpleSpeak", expr, "2 gånger 3");
}
#[test]
fn no_times_sqrt() {
let expr = "";
test("sv", "SimpleSpeak", expr,
"kvadratroten ur a; kvadratroten ur b; lika med, kvadratroten ur a b slut rot,");
}
/*
* Tests for parens
*/
#[test]
fn no_parens_number() {
let expr = "";
test("sv", "SimpleSpeak", expr, "25 gånger x");
}
#[test]
fn no_parens_monomial() {
let expr = "";
test("sv", "SimpleSpeak", expr, "b x y");
}
#[test]
fn no_parens_negative_number() {
let expr = "";
test("sv", "SimpleSpeak", expr, "2 plus minus 2");
}
#[test]
fn no_parens_negative_number_with_var() {
let expr = "";
test("sv", "SimpleSpeak", expr, "minus 2 x plus 1");
}
#[test]
fn parens_superscript() {
let expr = "";
test("sv", "SimpleSpeak", expr, "vänster-parentes; 2 x; höger-parentes kvadrat");
}
#[test]
fn no_parens_fraction() {
let expr = "";
test("sv", "SimpleSpeak", expr, "2 plus en halv");
}
// Tests for the four types of intervals in SimpleSpeak
#[test]
fn parens_interval_open_open() {
let expr = "";
test("sv", "SimpleSpeak",expr, "det öppna intervallet från c till d");
}
#[test]
fn parens_interval_closed_open() {
let expr = "";
test("sv", "SimpleSpeak",expr, "det halvöppna intervallet från och med c till d");
}
#[test]
fn parens_interval_open_closed() {
let expr = "";
test("sv", "SimpleSpeak",expr, "det halvöppna intervallet från c till och med d");
}
#[test]
fn parens_interval_closed_closed() {
let expr = "";
test("sv", "SimpleSpeak",expr, "det slutna intervallet från c till d");
}
#[test]
fn parens_interval_neg_infinity_open_open() {
let expr = "";
test("sv", "SimpleSpeak",expr,
"det öppna intervallet från minus oändligheten till d");
}
#[test]
fn parens_interval_neg_infinity_open_closed() {
let expr = "";
test("sv", "SimpleSpeak",expr,
"det halvöppna intervallet från minus oändligheten till och med d");
}