use crate::common::*; #[test] fn multiplication() { let expr = " 2×3 "; test("fi", "ClearSpeak", expr, "2 kertaa 3"); } #[test] fn multiplication_by() { let expr = " 2×3 "; test_ClearSpeak("fi", "ClearSpeak_MultSymbolX", "By", expr, "2 kertaa 3"); } #[test] fn multiplication_cross() { let expr = " u×v "; test_ClearSpeak("fi", "ClearSpeak_MultSymbolX", "Cross", expr, "u risti v"); } #[test] fn ellipses_auto_start() { let expr = " , -2,-1,0 "; test("fi", "ClearSpeak", expr, "piste piste piste pilkku negatiivinen 2 pilkku negatiivinen 1 pilkku 0"); } #[test] fn ellipses_auto_end() { let expr = " 1 , 2 , 3 , "; test_ClearSpeak("fi", "ClearSpeak_Ellipses", "Auto", expr, "1 pilkku 2 pilkku 3 pilkku piste piste piste"); } #[test] fn ellipses_auto_middle() { let expr = " 1 , 2 , 3 , , 20 "; test_ClearSpeak("fi", "ClearSpeak_Ellipses", "Auto", expr, "1 pilkku 2 pilkku 3 pilkku piste piste piste pilkku 20"); } #[test] fn ellipses_auto_both() { let expr = " , -2,-1,0,1,2 , "; test_ClearSpeak("fi", "ClearSpeak_Ellipses", "Auto", expr, "piste piste piste pilkku negatiivinen 2 pilkku negatiivinen 1 pilkku 0 pilkku 1 pilkku 2 pilkku piste piste piste"); } #[test] fn ellipses_and_so_on_start() { let expr = " , -2,-1,0 "; test_ClearSpeak("fi", "ClearSpeak_Ellipses", "AndSoOn", expr, "piste piste piste pilkku negatiivinen 2 pilkku negatiivinen 1 pilkku 0"); } #[test] fn ellipses_and_so_on_end() { let expr = " 1 , 2 , 3 , "; test_ClearSpeak("fi", "ClearSpeak_Ellipses", "AndSoOn", expr, "1 pilkku 2 pilkku 3 ja niin edelleen"); } #[test] fn ellipses_and_so_on_middle() { let expr = " 1 , 2 , 3 , , 20 "; test_ClearSpeak("fi", "ClearSpeak_Ellipses", "AndSoOn", expr, "1 pilkku 2 pilkku 3 ja niin edelleen kunnes, 20"); } #[test] fn ellipses_and_so_on_both() { let expr = " , -2,-1,0,1,2 , "; test_ClearSpeak("fi", "ClearSpeak_Ellipses", "AndSoOn", expr, "piste piste piste pilkku negatiivinen 2 pilkku negatiivinen 1 pilkku 0 pilkku 1 pilkku 2 pilkku piste piste piste"); } #[test] fn vertical_line_auto() { let expr = " 3|6 "; test_ClearSpeak("fi", "ClearSpeak_VerticalLine", "Auto", expr, "3 jakaa 6"); } #[test] fn vertical_line_divides() { let expr = " 3|6 "; test_ClearSpeak("fi", "ClearSpeak_VerticalLine", "Divides", expr, "3 jakaa 6"); } #[test] fn vertical_line_given() { let expr = " 3|6 "; test_ClearSpeak("fi", "ClearSpeak_VerticalLine", "Given", expr, "3 ehdolla 6"); } #[test] fn vertical_line_probability_given() { let expr = " P ( A | B ) "; test_ClearSpeak_prefs("fi", vec![("ClearSpeak_VerticalLine", "Given"), ("ClearSpeak_ImpliedTimes", "None")] , expr, "iso p, auki sulku, iso a ehdolla iso b, kiinni sulku"); } #[test] fn vertical_line_set() { let expr = " { x | x > 0 } "; test_ClearSpeak("fi", "ClearSpeak_VerticalLine", "Auto", expr, "joukko kaikilla x siten että x on suurempi kuin 0"); } #[test] fn vertical_line_set_such_that() { let expr = " { x | x > 0 } "; test_ClearSpeak("fi", "ClearSpeak_VerticalLine", "SuchThat", expr, "joukko kaikilla x siten että x on suurempi kuin 0"); } #[test] fn vertical_line_set_given() { let expr = " { x | x > 0 } "; // the rules for set will override all the options -- ClearSpeak spec should be clarified test_ClearSpeak("fi", "ClearSpeak_VerticalLine", "Given", expr, "joukko kaikilla x siten että x on suurempi kuin 0"); } #[test] fn vertical_line_set_and_abs() { let expr = " { x | | x | > 2 } "; test_ClearSpeak("fi", "ClearSpeak_VerticalLine", "Auto", expr, "joukko kaikilla x siten että itseisarvo x; on suurempi kuin 2"); } #[test] fn vertical_line_evaluated_at() { let expr = " f ( x ) | x = 5 "; test_ClearSpeak("fi", "ClearSpeak_VerticalLine", "Auto", expr, "f arvolla x, sijoitus, x on yhtä suuri kuin 5"); } #[test] fn vertical_line_evaluated_at_both() { let expr = " x 2 + x | 0 1 "; test_ClearSpeak("fi", "ClearSpeak_VerticalLine", "Auto", expr, "x toiseen plus x, sijoitus 1 miinus sama lauseke arvolla 0"); } #[test] fn vertical_line_evaluated_at_divides() { let expr = " f ( x ) | x = 5 "; test_ClearSpeak("fi", "ClearSpeak_VerticalLine", "Divides", expr, "f arvolla x, sijoitus, x on yhtä suuri kuin 5"); } #[test] fn vertical_line_evaluated_at_both_given() { let expr = " x 2 + x | 0 1 "; test_ClearSpeak("fi", "ClearSpeak_VerticalLine", "Given", expr, "x toiseen plus x, sijoitus 1 miinus sama lauseke arvolla 0"); }