/// Tests for rules shared between various speech styles:
/// * modified var
use crate::common::*;
#[test]
fn modified_vars() {
let expr = "";
test("en", "SimpleSpeak", expr,
"eigh grave, b tilde, c breve, b check, c grave; plus; \
x dot, y dot, z double dot, u triple dot, v quadruple dot; plus x hat, plus vector t");
}
#[test]
fn limit() {
let expr = "";
test("en", "SimpleSpeak", expr, "the limit as x approaches 0, of, fraction, sine of x, over x, end fraction;");
}
#[test]
fn limit_from_below() {
let expr = "";
test("en", "SimpleSpeak", expr, "the limit as x approaches from below 0, of sine of x");
}
#[test]
fn binomial_mmultiscripts() {
let expr = "";
test("en", "SimpleSpeak", expr, "n choose m");
}
#[test]
fn permutation_mmultiscripts() {
let expr = "";
test("en", "SimpleSpeak", expr, "k permutations of n");
}
#[test]
fn permutation_mmultiscripts_sup() {
let expr = "";
test("en", "SimpleSpeak", expr, "k permutations of n");
}
#[test]
fn permutation_msubsup() {
let expr = "";
test("en", "SimpleSpeak", expr, "k permutations of n");
}
#[test]
fn tensor_mmultiscripts() {
let expr = "";
test_prefs("en", "SimpleSpeak", vec![("Verbosity", "Verbose")], expr,
"cap r with 4 postscripts, subscript i superscript j subscript k subscript l");
test_prefs("en", "SimpleSpeak", vec![("Verbosity", "Medium")], expr,
"cap r with 4 postscripts, sub i super j sub k sub l");
}
#[test]
fn huge_num_mmultiscripts() {
let expr = "";
test_prefs("en", "SimpleSpeak", vec![("Verbosity", "Verbose")], expr,
"cap r with 4 prescripts, pre subscript cap i, pre superscript cap j and alternating prescripts cap k none cap l none end prescripts and with 5 postscripts, subscript i superscript j subscript k subscript l and alternating scripts m none end scripts");
}
#[test]
fn prime() {
let expr = "";
test("en", "SimpleSpeak", expr, "x prime,");
}
#[test]
fn given() {
let expr = "";
test("en", "SimpleSpeak", expr, "cap p, open paren, cap eigh vertical line cap b; close paren");
test("en", "ClearSpeak", expr, "cap p, open paren, cap eigh divides cap b, close paren"); // not good, but follows the spec
}
#[test]
fn simple_msubsup() {
let expr = "";
test("en", "ClearSpeak", expr, "x sub k to the i-th power");
}
#[test]
fn presentation_mathml_in_semantics() {
let expr = "";
test("en", "ClearSpeak", expr, "x sub k to the i-th power");
}
#[test]
fn ignore_period() {
// from https://en.wikipedia.org/wiki/Probability
let expr = "";
test("en", "SimpleSpeak", expr, "cap p; open paren, cap eigh and cap b; close paren; is equal to; cap p, open paren, cap eigh intersection cap b; close paren; is equal to, cap p of cap eigh, cap p of cap b");
}
#[test]
fn ignore_mtext_period() {
let expr = "";
test("en", "SimpleSpeak", expr, "the set 2");
}
#[test]
fn ignore_comma() {
// from https://en.wikipedia.org/wiki/Probability
let expr = "";
test("en", "SimpleSpeak", expr, "phi of x is equal to; c, e raised to the negative h squared x squared power");
}
#[test]
#[ignore] // issue #14
fn ignore_period_and_space() {
// from https://en.wikipedia.org/wiki/Probability
let expr = "";
test("en", "ClearSpeak", expr, "phi of x is equal to; c, e raised to the negative h squared x squared power");
}
#[test]
fn mn_with_space() {
let expr = "";
test("en", "SimpleSpeak", expr, "1234567");
}