use crate::common::*; #[test] fn case_1() { let expr = " f ( x ) = { -1ifx<0 0ifx=0 1ifx>0 "; test_ClearSpeak("en", "ClearSpeak_MultiLineLabel", "Auto", expr, "f of x is equal to; 3 cases, \ case 1; negative 1 if x is less than 0; \ case 2; 0 if x is equal to 0; \ case 3; 1 if x is greater than 0;" ) } #[test] fn equation_auto() { let expr = " x+y = 7 2x+3y = 17 "; test_ClearSpeak("en", "ClearSpeak_MultiLineLabel", "Auto", expr, "2 lines, \ line 1; x plus y, is equal to, 7; \ line 2; 2 x plus 3 y, is equal to, 17;"); } #[test] fn equation_plus_at_start() { let expr = " x+y = 7 2x+3y = 17 "; test_ClearSpeak("en", "ClearSpeak_MultiLineLabel", "Auto", expr, "2 lines, \ line 1; x plus y, is equal to, 7; \ line 2; 2 x plus 3 y, is equal to, 17;"); } #[test] fn equation_case() { let expr = " x+y = 7 2x+3y = 17 "; test_ClearSpeak("en", "ClearSpeak_MultiLineLabel", "Case", expr, "2 cases, case 1; x plus y, is equal to, 7; case 2; 2 x plus 3 y, is equal to, 17;"); } #[test] fn equation_constraint() { let expr = " x+y = 7 2x+3y = 17 "; test_ClearSpeak("en", "ClearSpeak_MultiLineLabel", "Constraint", expr, "2 constraints, \ constraint 1; x plus y, is equal to, 7; \ constraint 2; 2 x plus 3 y, is equal to, 17;"); } #[test] fn equation_equation() { let expr = " x+y = 7 2x+3y = 17 "; test_ClearSpeak("en", "ClearSpeak_MultiLineLabel", "Equation", expr, "2 equations, \ equation 1; x plus y, is equal to, 7; \ equation 2; 2 x plus 3 y, is equal to, 17;"); } #[test] fn equation_line() { let expr = " x+y = 7 2x+3y = 17 "; test_ClearSpeak("en", "ClearSpeak_MultiLineLabel", "Line", expr, "2 lines, \ line 1; x plus y, is equal to, 7; \ line 2; 2 x plus 3 y, is equal to, 17;"); } #[test] fn equation_none() { let expr = " x+y = 7 2x+3y = 17 "; test_ClearSpeak("en", "ClearSpeak_MultiLineLabel", "None", expr, "\ 2, x plus y, is equal to, 7; \ 2 x plus 3 y, is equal to, 17;"); } #[test] fn equation_row() { let expr = " x+y = 7 2x+3y = 17 "; test_ClearSpeak("en", "ClearSpeak_MultiLineLabel", "Row", expr, "2 rows, \ row 1; x plus y, is equal to, 7; \ row 2; 2 x plus 3 y, is equal to, 17;"); } #[test] fn equation_step() { let expr = " x+y = 7 2x+3y = 17 "; test_ClearSpeak("en", "ClearSpeak_MultiLineLabel", "Step", expr, "2 steps, \ step 1; x plus y, is equal to, 7; \ step 2; 2 x plus 3 y, is equal to, 17;"); } #[test] fn continued_row() { let expr = " x=y +1 y=1 "; test("en", "SimpleSpeak", expr, "2 equations, equation 1; x, is equal to, y plus 1; equation 2; y, is equal to, 1;"); }