/// Tests for fractions
/// includes simple fractions and more complex fractions
/// also tests mixed fractions (implicit and explicit)
use crate::common::*;
#[test]
fn common_fraction_half() {
let expr = "";
test("en", "SimpleSpeak", expr, "1 half");
}
#[test]
fn common_fraction_thirds() {
let expr = "";
test("en", "SimpleSpeak", expr, "2 thirds");
}
#[test]
fn common_fraction_tenths() {
let expr = "";
test("en", "SimpleSpeak", expr, "17 tenths");
}
#[test]
#[allow(non_snake_case)]
fn not_SimpleSpeak_common_fraction_tenths() {
let expr = "";
test("en", "SimpleSpeak", expr, "89 over 10,");
}
#[test]
fn non_simple_fraction() {
let expr = "
";
test("en", "SimpleSpeak", expr, "fraction, x plus y, over, x minus y, end fraction;");
}
#[test]
fn nested_fraction() {
let expr = "
";
test("en", "SimpleSpeak", expr, "fraction, x plus, fraction, 1 over y, end fraction; over, x minus y, end fraction;");
}
#[test]
fn deeply_nested_fraction_msqrt() {
let expr = "
";
test("en", "SimpleSpeak", expr, "fraction, x plus, the square root of 1 over y, end root; over, x minus y, end fraction;");
}
#[test]
fn deeply_nested_fraction_mrow_msqrt() {
let expr = "
";
test("en", "SimpleSpeak", expr, "fraction, x plus, the square root of 2 plus 1 over y, end root; over, x minus y, end fraction;");
}
#[test]
fn numerator_simple_fraction() {
let expr = "
";
test("en", "SimpleSpeak", expr, "fraction, x over, x minus y, end fraction;");
}
#[test]
fn denominator_simple_fraction() {
let expr = "
";
test("en", "SimpleSpeak", expr, "fraction, x minus y, over x, end fraction;");
}
#[test]
fn mixed_number() {
let expr = "";
test("en", "SimpleSpeak", expr, "3 and 1 half");
}
#[test]
fn explicit_mixed_number() {
let expr = "";
test("en", "SimpleSpeak", expr, "3 and 1 eighth");
}
#[test]
fn mixed_number_big() {
let expr = "";
test("en", "SimpleSpeak", expr, "3 and 7 eighty thirds");
}
#[test]
fn simple_text() {
let expr = "";
test("en", "SimpleSpeak", expr, "rise over run,");
}
#[test]
fn number_and_text() {
let expr = "";
test("en", "SimpleSpeak", expr, "fraction, 2 miles, over, 3 gallons, end fraction;");
}
#[test]
fn nested_simple_fractions() {
let expr = "";
test("en", "SimpleSpeak", expr, "fraction, 1 half, over, 2 thirds, end fraction;");
}
#[test]
fn binomial() {
let expr = "";
test("en", "SimpleSpeak", expr, "2 times 7 choose 3");
}