use crate::common::*; #[test] fn matrix_1x1() { let expr = " ( 3 ) "; test("zh-tw", "SimpleSpeak", expr, "1 乘 1 矩陣 成員 3;"); } #[test] fn determinant_1x1() { let expr = " | 3 | "; test("zh-tw", "SimpleSpeak", expr, "1 乘 1 行列式 成員 3;"); } #[test] fn matrix_1x2() { let expr = " ( 3 5 ) "; test("zh-tw", "SimpleSpeak", expr, "1 乘 2 矩陣; 3, 5;"); } #[test] fn matrix_1x3() { let expr = " ( -x 5 12 ) "; test("zh-tw", "SimpleSpeak", expr, "1 乘 3 矩陣; 負 x, 5, 12;"); } #[test] fn matrix_2x1_not_simple() { let expr = " ( x+1 x-1 ) "; test("zh-tw", "SimpleSpeak", expr, "2 乘 1 矩陣; 列 1; x 加 1; 列 2; x 減 1;"); } #[test] fn matrix_3x1_not_simple() { let expr = " ( x a x x+1 ) "; test("zh-tw", "SimpleSpeak", expr, "3 乘 1 矩陣; \ 列 1; x; \ 列 2; a; \ 列 3; 分數 x 加 1, 分之 x 結束分數;"); } #[test] fn determinant_2x2() { let expr = " | 2 1 7 5 | "; test("zh-tw", "SimpleSpeak", expr, "2 乘 2 行列式; 列 1; 2, 1; 列 2; 7, 5;"); } #[test] fn matrix_2x3() { let expr = " [ 3 1 4 0 2 6 ] "; test("zh-tw", "SimpleSpeak", expr, "2 乘 3 矩陣; 列 1; 3, 1, 4; 列 2; 0, 2, 6;"); } #[test] fn matrix_2x3_labeled() { let expr = " [ (3.1) 3 1 4 0 2 6 ] "; test("zh-tw", "SimpleSpeak", expr, "2 乘 3 矩陣; 列 1 帶有標籤 (3.1); 行 2; 3, 行 3; 1, 行 4; 4; \ 列 2; 行 1; 0, 行 2; 2, 行 3; 6;"); } #[test] fn matrix_3x1() { let expr = " [ 1 2 3 ] "; test("zh-tw", "SimpleSpeak", expr, "3 乘 1 矩陣; 1; 2; 3;"); } #[test] fn matrix_4x1() { let expr = " ( 3 6 1 2 ) "; test("zh-tw", "SimpleSpeak", expr, "4 乘 1 矩陣; 列 1; 3; 列 2; 6; 列 3; 1; 列 4; 2;"); } #[test] fn matrix_4x1_labeled() { let expr = " ( 3 6 1 (3.1) 2 ) "; test("zh-tw", "SimpleSpeak", expr, "4 乘 1 矩陣; 列 1; 3; 列 2; 6; 列 3; 1; 列 4 帶有標籤 (3.1); 2;"); } #[test] fn matrix_1x4() { let expr = " ( 3 6 1 2 ) "; test("zh-tw", "SimpleSpeak", expr, "1 乘 4 矩陣; 行 1; 3, 行 2; 6, 行 3; 1, 行 4; 2;"); } #[test] fn matrix_4x4() { let expr = " ( 0 3 4 3 2 1 0 9 3 0 2 1 6 2 9 0 ) "; test("zh-tw", "SimpleSpeak", expr, "4 乘 4 矩陣; \ 列 1; 行 1; 0, 行 2; 3, 行 3; 4, 行 4; 3; \ 列 2; 行 1; 2, 行 2; 1, 行 3; 0, 行 4; 9; \ 列 3; 行 1; 3, 行 2; 0, 行 3; 2, 行 4; 1; \ 列 4; 行 1; 6, 行 2; 2, 行 3; 9, 行 4; 0;");} #[test] fn matrix_4x2() { let expr = " ( 1 3 4 2 2 1 0 5 ) "; test("zh-tw", "SimpleSpeak", expr, "4 乘 2 矩陣; \ 列 1; 行 1; 1, 行 2; 3; \ 列 2; 行 1; 4, 行 2; 2; \ 列 3; 行 1; 2, 行 2; 1; \ 列 4; 行 1; 0, 行 2; 5;\ "); } // put absolute value test here since it is related to determinate and is small for its own file #[test] fn simple_absolute_value() { let expr = " | x | "; test("zh-tw", "SimpleSpeak", expr, "x 的 絕對值"); } #[test] fn absolute_value_plus_1() { let expr = " | x+1 | "; test("zh-tw", "SimpleSpeak", expr, "x 加 1 的 絕對值"); } // Test preferences