use crate::common::*; #[test] fn msqrt_simple() { let expr = " x "; test("fi", "ClearSpeak", expr, "neliöjuuri x,"); } #[test] fn msqrt_simple_end_root() { let expr = " x "; test_ClearSpeak("fi", "ClearSpeak_Roots", "RootEnd", expr, "neliöjuuri x, loppu juuri;"); } #[test] fn msqrt_simple_positive() { let expr = " x "; test_ClearSpeak("fi", "ClearSpeak_Roots", "PosNegSqRoot", expr, "positiivinen neliöjuuri x,"); } #[test] fn msqrt_simple_pos_end_root() { let expr = " x "; test_ClearSpeak("fi", "ClearSpeak_Roots", "PosNegSqRootEnd", expr, "positiivinen neliöjuuri x, loppu juuri;"); } #[test] fn msqrt_simple_pos_end_with_neg_root() { let expr = " - x - x 3 "; test_ClearSpeak("fi", "ClearSpeak_Roots", "PosNegSqRootEnd", expr, "negatiivinen neliöjuuri x, loppu juuri; miinus, positiivinen kuutiojuuri x, loppu juuri;"); } #[test] fn mroot_simple_pos_end_with_neg_root() { let expr = " - x 3 - x "; test_ClearSpeak("fi", "ClearSpeak_Roots", "PosNegSqRoot", expr, "negatiivinen kuutiojuuri x; miinus positiivinen neliöjuuri x,"); } #[test] fn neg_without_root() { let expr = " - x - y "; test("fi", "ClearSpeak", expr, "negatiivinen x miinus y"); } #[test] fn msqrt() { let expr = " x + y "; test("fi", "ClearSpeak", expr, "neliöjuuri x plus y;"); } #[test] fn mroot_as_square_root() { let expr = " x 2 "; test("fi", "ClearSpeak", expr, "neliöjuuri x,"); } #[test] fn cube_root() { let expr = " x 3 "; test("fi", "ClearSpeak", expr, "kuutiojuuri x,"); } #[test] fn ordinal_root() { let expr = " x 9 "; test("fi", "ClearSpeak", expr, "yhdeksäs juuri x,"); } #[test] fn simple_mi_root() { let expr = " x n "; test("fi", "ClearSpeak", expr, "nnes juuri x,"); } #[test] fn mroot_simple_pos_end_root() { let expr = " x t "; test_ClearSpeak("fi", "ClearSpeak_Roots", "PosNegSqRootEnd", expr, "positiivinen tnes juuri x, loppu juuri;"); } #[test] fn mroot_simple_end_root() { let expr = " x + y 5 "; test_ClearSpeak("fi", "ClearSpeak_Roots", "RootEnd", expr, "viides juuri x plus y, loppu juuri;"); } #[test] fn mroot_above_20_simple_end_root() { let expr = " x + y 21 "; test_ClearSpeak("fi", "ClearSpeak_Roots", "RootEnd", expr, "21 juuri x plus y, loppu juuri;"); } #[test] fn variable_mroot() { let expr = " x n+1 "; test("fi", "ClearSpeak", expr, "n plus 1 juuri x,"); } #[test] fn simple_fraction_power() { let expr = " x 13 "; test("fi", "ClearSpeak", expr, "1 kolmasosa juuri x,"); }