/// Tests for rules shared between various speech styles:
/// * modified var
use crate::common::*;
#[test]
fn salt() {
let expr = "";
test_prefs("fi", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "iso n a, iso c l,");
}
#[test]
fn water() {
let expr = "";
test_prefs("fi", "ClearSpeak", vec![("Verbosity", "Terse")], expr, "iso h, 2 iso o,");
test_prefs("fi", "ClearSpeak", vec![("Verbosity", "Medium")], expr, "iso h, ala 2 iso o,");
test_prefs("fi", "ClearSpeak", vec![("Verbosity", "Verbose")], expr, "iso h, alaindeksi 2, iso o,");
}
#[test]
fn carbon() {
let expr = ""; // not enough to trigger recognition
test_prefs("fi", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "iso c");
}
#[test]
fn sulfate() {
let expr = "";
test_prefs("fi", "ClearSpeak", vec![("Verbosity", "Medium")], expr, "auki hakasulku, iso s, iso o, ala 4; kiinni hakasulku ylä 2 miinus");
}
#[test]
fn aluminum_sulfate() {
let expr = "";
test_prefs("fi", "ClearSpeak", vec![("Verbosity", "Terse")], expr, "iso a l, 2, auki iso s, iso o, 4, kiinni 3");
test_prefs("fi", "ClearSpeak", vec![("Verbosity", "Medium")], expr, "iso a l, ala 2; auki sulku, iso s, iso o, ala 4; kiinni sulku ala 3");
test_prefs("fi", "ClearSpeak", vec![("Verbosity", "Verbose")], expr, "iso a l, alaindeksi 2; auki sulku, iso s, iso o, alaindeksi 4; kiinni sulku alaindeksi 3");
}
#[test]
fn ethanol_bonds() {
let expr = "";
test_prefs("fi", "ClearSpeak", vec![("Verbosity", "Terse")], expr, "iso c, iso h, 3 yksinkertainen sidos, iso c, iso h, 2 yksinkertainen sidos, iso o, iso h,");
}
#[test]
fn dichlorine_hexoxide() {
let expr = "";
test_prefs("fi", "SimpleSpeak", vec![("Verbosity", "Terse")],
expr, "auki hakasulku, iso c l, iso o, 2; kiinni hakasulku plus; auki hakasulku, iso c l, iso o, 4; kiinni hakasulku miinus");
test_prefs("fi", "SimpleSpeak", vec![("Verbosity", "Medium")],
expr, "auki hakasulku, iso c l, iso o, ala 2; kiinni hakasulku ylä plus; auki hakasulku, iso c l, iso o, ala 4; kiinni hakasulku ylä miinus");
test_prefs("fi", "SimpleSpeak", vec![("Verbosity", "Verbose")],
expr, "auki hakasulku, iso c l, iso o, alaindeksi 2; kiinni hakasulku yläindeksi plus; auki hakasulku, iso c l, iso o, alaindeksi 4; kiinni hakasulku yläindeksi miinus");
}
#[test]
fn ethylene_with_bond() {
let expr = "";
test_prefs("fi", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "iso h, 2 iso c, kaksinkertainen sidos, iso c, iso h, 2");
}
#[test]
fn ferric_chloride_aq() {
let expr = "";
test_prefs("fi", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "iso f e, iso c l, 3 vesiliuoksessa,");
}
#[test]
fn ethylene_with_colon_bond() {
let expr = "";
test_prefs("fi", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "iso h, 2 iso c, kaksinkertainen sidos, iso c, iso h, 2");
}
#[test]
fn beta_decay() {
let expr = "";
test_prefs("fi", "ClearSpeak", vec![("Verbosity", "Terse")], expr,
"14, 6, iso c; muodostaa; 14, 7, iso n; plus 0, negatiivinen 1, e,");
test_prefs("fi", "ClearSpeak", vec![("Verbosity", "Medium")], expr,
"ylä 14, ala 6, iso c; reagoi; ylä 14, ala 7, iso n; plus, ylä 0, ala negatiivinen 1, e,");
test_prefs("fi", "ClearSpeak", vec![("Verbosity", "Verbose")], expr,
"yläindeksi 14, alaindeksi 6, iso c; reagoi; yläindeksi 14, alaindeksi 7, iso n; plus, yläindeksi 0, alaindeksi negatiivinen 1, e,");
}
#[test]
fn mhchem_beta_decay() {
let expr = "";
test_prefs("fi", "ClearSpeak", vec![("Verbosity", "Terse")], expr,
"14, 6, iso c; muodostaa; 14, 7, iso n; plus 0, negatiivinen 1, e,");
test_prefs("fi", "ClearSpeak", vec![("Verbosity", "Medium")], expr,
"ylä 14, ala 6, iso c; reagoi; ylä 14, ala 7, iso n; plus, ylä 0, ala negatiivinen 1, e,");
test_prefs("fi", "ClearSpeak", vec![("Verbosity", "Verbose")], expr,
"yläindeksi 14, alaindeksi 6, iso c; reagoi; yläindeksi 14, alaindeksi 7, iso n; plus, yläindeksi 0, alaindeksi negatiivinen 1, e,");
}
#[test]
fn hcl_na_yields() {
let expr = "";
test_prefs("fi", "SimpleSpeak", vec![("Verbosity", "Verbose")], expr,
"2, iso h, iso c l; plus 2 iso n a; reagoi; 2, iso n a, iso c l; plus iso h, alaindeksi 2");
}
#[test]
fn mhchem_so4_2plus() {
let expr = "";
test_prefs("fi", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "iso s; iso o, 4, 2 plus,");
test_prefs("fi", "SimpleSpeak", vec![("Verbosity", "Medium")], expr, "iso s; iso o, ala 4, ylä 2 plus,");
test_prefs("fi", "SimpleSpeak", vec![("Verbosity", "Verbose")], expr, "iso s; iso o, alaindeksi 4, yläindeksi 2 plus,");
}
#[test]
fn mhchem_hcl_aq_etc() {
let expr = "";
test_prefs("fi", "SimpleSpeak", vec![("Verbosity", "Terse")],
expr, "2, iso h, iso c l, vesiliuoksessa; plus, 2, iso n a, kiinteä; muodostaa; 2, iso n a, iso c l, vesiliuoksessa; plus, iso h, 2, kaasu,");
}
#[test]
fn mhchem_barbed_equilibrium() {
let expr = "";
test_prefs("fi", "SimpleSpeak", vec![("Verbosity", "Terse")],
expr, "iso h, 2, kaasu; plus; iso i, 2, kaasu; on tasapainossa 2, iso h, iso i, kaasu,");
}
#[test]
fn mhchem_roman_in_superscript() {
let expr = "";
test_prefs("fi", "SimpleSpeak", vec![("Verbosity", "Terse")],
expr, "iso f e, 2; iso f e, 3; iso o, 4,");
}