/// 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("zh-tw", "SimpleSpeak", expr, "sine x 加 cosine y 加 tangent z 加 secant alpha, 加 cosecant phi, 加 cotangent phi");
}
#[test]
fn hyperbolic_trig_names() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "hyperbolic sine x, 加 \
hyperbolic cosine y, 加 \
hyperbolic tangent z, 加 \
hyperbolic secant alpha, 加 \
hyperbolic cosecant phi, 加 \
hyperbolic cotangent, phi");
}
#[test]
fn inverse_trig() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "反 sine x");
}
#[test]
fn trig_squared() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "sine 平方 x");
}
#[test]
fn trig_cubed() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "tangent 立方 x");
}
#[test]
fn trig_fourth() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "secant 的 4 次方; x");
}
#[test]
fn trig_power_other() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "hyperbolic sine 的 n 減 1 次方; x");
}
#[test]
fn simple_log() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "log x");
}
#[test]
fn normal_log() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "log, 左小括 x 加 y 右小括");
}
#[test]
fn simple_log_with_base() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "log 底 b x");
}
#[test]
fn normal_log_with_base() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "log 底 b, 左小括 x 加 y 右小括");
}
#[test]
fn simple_ln() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "l n x");
}
#[test]
fn normal_ln() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "l n, 左小括 x 加 y 右小括");
}
#[test]
fn normal_ln_terse() {
let expr = "";
test_prefs("zh-tw", "SimpleSpeak", vec![("Verbosity", "Terse")],
expr, "l n, 左小括 x 加 y 右小括");
}
#[test]
fn simple_ln_terse() {
let expr = "";
test_prefs("zh-tw", "SimpleSpeak", vec![("Verbosity", "Terse")],
expr, "l n x");
}
#[test]
fn explicit_function_call_with_parens() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "t x");
}
#[test]
fn explicit_times_with_parens() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "t 乘 x");
}
#[test]
fn explicit_function_call() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "t x");
}
#[test]
fn explicit_times() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "t x");
}
/*
* Tests for times
*/
#[test]
fn no_times_binomial() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "x y");
}
#[test]
fn times_following_paren() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "2 乘 3");
}
#[test]
fn times_preceding_paren() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "2 乘 3");
}
#[test]
fn no_times_sqrt() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr,
"根號 a, 根號 b; 等於, 根號 a b 結束根號;");
}
/*
* Tests for parens
*/
#[test]
fn no_parens_number() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "25 乘 x");
}
#[test]
fn no_parens_monomial() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "b x y");
}
#[test]
fn no_parens_negative_number() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "2 加 負 2");
}
#[test]
fn no_parens_negative_number_with_var() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "負 2 x 加 1");
}
#[test]
fn parens_superscript() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "左小括 2 x 右小括 平方");
}
#[test]
fn no_parens_fraction() {
let expr = "";
test("zh-tw", "SimpleSpeak", expr, "2 加 2 分之 1");
}
// Tests for the four types of intervals in SimpleSpeak
#[test]
fn parens_interval_open_open() {
let expr = "";
///// mysterious intent
test("zh-tw", "SimpleSpeak",expr, "開區間 c 逗號 d");
}
#[test]
fn parens_interval_closed_open() {
let expr = "";
test("zh-tw", "SimpleSpeak",expr, "閉開區間 c 逗號 d");
}
#[test]
fn parens_interval_open_closed() {
let expr = "";
test("zh-tw", "SimpleSpeak",expr,"開閉區間 c 逗號 d");
}
#[test]
fn parens_interval_closed_closed() {
let expr = "";
test("zh-tw", "SimpleSpeak",expr, "閉區間 c 逗號 d");
}
#[test]
fn parens_interval_neg_infinity_open_open() {
let expr = "";
test("zh-tw", "SimpleSpeak",expr,
"開區間 負 無限大 逗號 d");
}
#[test]
fn parens_interval_neg_infinity_open_closed() {
let expr = "";
test("zh-tw", "SimpleSpeak",expr,
"開閉區間 負 無限大 逗號 d");
}