Exemple #1
0
 public void test_domain_error(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
Exemple #2
0
 public void test_basic_error_throwing(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
Exemple #3
0
 public void test_unexpected_operator()
 {
     // unexpected operator
     Tester.ThrowTest("5+*3)", EErrorCodes.ecUNEXPECTED_OPERATOR);
 }
Exemple #4
0
 public void test_issue25()
 {
     Tester.ThrowTest("55<<2222222222", EErrorCodes.ecOVERFLOW); // Changed to longer number to overflow on 64bit
 }
Exemple #5
0
 public void test_binary_op_type_conflicts(string s, EErrorCodes e, int i) => Tester.ThrowTest(s, e, i);
Exemple #6
0
 public void test_unexpected_parens(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
Exemple #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);
Exemple #8
0
 public void test_invalid_function_arguments(string s, EErrorCodes e, int i) => Tester.ThrowTest(s, e, i);
Exemple #9
0
 public void test_assignment_to_element_throwing() => Tester.ThrowTest("va'[0]=123", EErrorCodes.ecASSIGNEMENT_TO_VALUE);
Exemple #10
0
 [DataRow("10+va*2", EErrorCodes.ecEVAL)]   // fail: number + vector
 public void test_vector_operations(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
Exemple #11
0
 public void test_eye_error_throwing() => Tester.ThrowTest("eye()", EErrorCodes.ecINVALID_NUMBER_OF_PARAMETERS);
Exemple #12
0
 public void test_ones_EErrorCodes(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
Exemple #13
0
 public void test_matrix_dimension_mismatch_error(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
Exemple #14
0
 public void test_index_out_of_bounds(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
Exemple #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);
Exemple #16
0
 public void test_try_assign_nonexistent_var()
 {
     Tester.ThrowTest("sin(nonexistent_var)", EErrorCodes.ecUNASSIGNABLE_TOKEN, 4, "nonexistent_var");
 }
Exemple #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);
Exemple #18
0
 public void test_invalid_unary_operator_arguments(string s, EErrorCodes e, int p) => Tester.ThrowTest(s, e, p);
Exemple #19
0
 public void test_vector_malformed_brackets(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
Exemple #20
0
 public void test_unexpected_end_of_expression(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
Exemple #21
0
 public void test_unexpeted_comma(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
Exemple #22
0
 public void test_unassignable_token(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
Exemple #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);
 }
Exemple #24
0
 public void test_missing_params(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
Exemple #25
0
 [DataRow("a+0x", EErrorCodes.ecUNASSIGNABLE_TOKEN)] // incomplete hex value
 public void test_value_recognition(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
Exemple #26
0
 public void test_error_detection(string s, EErrorCodes e) => Tester.ThrowTest(s, e);
Exemple #27
0
 public void test_boolean_throw_undefined()
 {
     Tester.ThrowTest("0b10000000000000000000000000000000000000000000000000000000000000001", EErrorCodes.ecCONVERSION_OVERFLOW);
 }