Пример #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);
 }