/// 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("sv", "SimpleSpeak", expr, "en halv");
}
#[test]
fn common_fraction_thirds() {
let expr = "";
test("sv", "SimpleSpeak", expr, "2 tredjedelar");
}
#[test]
fn common_fraction_tenths() {
let expr = "";
test("sv", "SimpleSpeak", expr, "17 tiondelar");
}
#[test]
#[allow(non_snake_case)]
fn not_SimpleSpeak_common_fraction_tenths() {
let expr = "";
test("sv", "SimpleSpeak", expr, "89 genom 10,");
}
#[test]
fn non_simple_fraction() {
let expr = "
";
test("sv", "SimpleSpeak", expr, "division, x plus y, genom, x minus y, slut division;");
}
#[test]
fn nested_fraction() {
let expr = "
";
test("sv", "SimpleSpeak", expr, "division, x plus, division, 1 genom y, slut division; genom, x minus y, slut division;");
}
#[test]
fn deeply_nested_fraction_msqrt() {
let expr = "
";
test("sv", "SimpleSpeak", expr, "division, x plus, kvadratroten ur 1 genom y, slut rot; genom, x minus y, slut division;");
}
#[test]
fn deeply_nested_fraction_mrow_msqrt() {
let expr = "
";
test("sv", "SimpleSpeak", expr, "division, x plus, kvadratroten ur 2 plus 1 genom y, slut rot; genom, x minus y, slut division;");
}
#[test]
fn numerator_simple_fraction() {
let expr = "
";
test("sv", "SimpleSpeak", expr, "division, x genom, x minus y, slut division;");
}
#[test]
fn denominator_simple_fraction() {
let expr = "
";
test("sv", "SimpleSpeak", expr, "division, x minus y, genom x, slut division;");
}
#[test]
fn mixed_number() {
let expr = "";
test("sv", "SimpleSpeak", expr, "3 och en halv");
}
#[test]
fn explicit_mixed_number() {
let expr = "";
test("sv", "SimpleSpeak", expr, "3 och en åttondel");
}
#[test]
fn mixed_number_big() {
let expr = "";
test("sv", "SimpleSpeak", expr, "3 och 7 genom 83,");
}
#[test]
fn simple_text() {
let expr = "";
test("sv", "SimpleSpeak", expr, "rise genom run,");
}
#[test]
fn number_and_text() {
let expr = "";
test("sv", "SimpleSpeak", expr, "division, 2 miles, genom, 3 gallons, slut division;");
}
#[test]
fn nested_simple_fractions() {
let expr = "";
test("sv", "SimpleSpeak", expr, "division, en halv, genom, 2 tredjedelar, slut division;");
}
#[test]
fn binomial() {
let expr = "";
test("sv", "SimpleSpeak", expr, "2 gånger, 7 över 3");
}