-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfailure case tests.txt
36 lines (35 loc) · 2.16 KB
/
failure case tests.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Compiler:
-No type signature
Type signature constructor:
-Empty type signature
-Unexpected close bracket
-Unclosed bracket clause
-Multiple tokens in type definition
(doesn't actually get triggered, consecutive words indicate beginning of expression signature, and error would be caught later)
-Non-word given as type
-Invalid type given
-No expression definition (i.e. equals sign)
-No expression identifier (also doesn't get triggered due to consecutive words indicating expression signature start)
-No unique identifier for expression (i.e. multiple or no instances of an expression with a given identifier)
-Non-word given as parameter
-Too many parameters
-Too few parameters
Expression definition (PushSubExpressions):
-Invalid token (i.e. function map or equals sign)
-Too many subexpressions passed (i.e. more than 1 variable or base subexpression with too many arguments)
-Unexpected close bracket
-Condition block has then and else clauses which don't match type expression
OR then or else clause don't match parameter type expression (thrown from recursed call, final error here)
-Bracketed expression doesn't match parameter type signature (also thrown from recursed call)
-No unique identifier for expression (in this case when parameter shares the same name as an expression)
-Subexpression doesn't match parameter type signature of base subexpression (2 places thrown)
-Literal value doesn't match parameter type
-Unclosed bracket clause
-Incomplete condition block
-Final base subexpression with given arguments doesn't match target type signature
Runtime environment (in theory if the compiler works, none of these should be thrown [except base expression exceptions]):
-Evaluating unevaluated expression (i.e. trying to get literal value of function)
-Failure evaluating subexpressions of expression, would be caused by invalid argument counts or condition specifiers
-Trying to evaluate evaluated expression with argument (i.e. passing an argument to a literal value)
-Failure trying to evaluate base expression
(theoretically only runtime error that could occur, as compiler cannot infer the parameter types of many base expressions)