示例#1
0
 public void test_domain_error(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
示例#2
0
 public void test_basic_error_throwing(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
示例#3
0
 public void test_unexpected_operator()
 {
     // unexpected operator
     Tester.ThrowTest("5+*3)", EErrorCodes.ecUNEXPECTED_OPERATOR);
 }
示例#4
0
 public void test_issue25()
 {
     Tester.ThrowTest("55<<2222222222", EErrorCodes.ecOVERFLOW); // Changed to longer number to overflow on 64bit
 }
示例#5
0
 public void test_binary_op_type_conflicts(string s, EErrorCodes e, int i) => Tester.ThrowTest(s, e, i);
示例#6
0
 public void test_unexpected_parens(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
示例#7
0
 [DataRow("(va*vb)*b", EErrorCodes.ecMATRIX_DIMENSION_MISMATCH)] // fail: matrix dimension mismatch
 public void test_vector_dimension_mismatch(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
示例#8
0
 public void test_invalid_function_arguments(string s, EErrorCodes e, int i) => Tester.ThrowTest(s, e, i);
示例#9
0
 public void test_assignment_to_element_throwing() => Tester.ThrowTest("va'[0]=123", EErrorCodes.ecASSIGNEMENT_TO_VALUE);
示例#10
0
 [DataRow("10+va*2", EErrorCodes.ecEVAL)]   // fail: number + vector
 public void test_vector_operations(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
示例#11
0
 public void test_eye_error_throwing() => Tester.ThrowTest("eye()", EErrorCodes.ecINVALID_NUMBER_OF_PARAMETERS);
示例#12
0
 public void test_ones_EErrorCodes(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
示例#13
0
 public void test_matrix_dimension_mismatch_error(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
示例#14
0
 public void test_index_out_of_bounds(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
示例#15
0
 [DataRow("a[1]", EErrorCodes.ecINDEX_OUT_OF_BOUNDS)] // indexing a scalar is ok, but this index is out of bounds (0 would be ok...)
 public void test_vector_index_bounds(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
示例#16
0
 public void test_try_assign_nonexistent_var()
 {
     Tester.ThrowTest("sin(nonexistent_var)", EErrorCodes.ecUNASSIGNABLE_TOKEN, 4, "nonexistent_var");
 }
示例#17
0
 [DataRow("va[sin(8)]", EErrorCodes.ecTYPE_CONFLICT_IDX, -1)] // fail: float value used as index
 public void test_vector_index_type_conflict(string s, EErrorCodes e, int i = -1) => Tester.ThrowTest(s, e, i);
示例#18
0
 public void test_invalid_unary_operator_arguments(string s, EErrorCodes e, int p) => Tester.ThrowTest(s, e, p);
示例#19
0
 public void test_vector_malformed_brackets(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
示例#20
0
 public void test_unexpected_end_of_expression(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
示例#21
0
 public void test_unexpeted_comma(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
示例#22
0
 public void test_unassignable_token(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
示例#23
0
 public void test_unexpected_variable()
 {
     // unexpected variable
     // if a variable factory is installed ecUNEXPECTED_VAR
     Tester.ThrowTest("a _xxx_ b", EErrorCodes.ecUNASSIGNABLE_TOKEN, 2);
 }
示例#24
0
 public void test_missing_params(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
示例#25
0
 [DataRow("a+0x", EErrorCodes.ecUNASSIGNABLE_TOKEN)] // incomplete hex value
 public void test_value_recognition(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
示例#26
0
 public void test_error_detection(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
示例#27
0
 public void test_boolean_throw_undefined()
 {
     Tester.ThrowTest("0b10000000000000000000000000000000000000000000000000000000000000001", EErrorCodes.ecCONVERSION_OVERFLOW);
 }