-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutput02.txt
94 lines (82 loc) · 3 KB
/
output02.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
$$$$$$$$$$$$ RUN $$$$$$$$$$$$$
Successful test: handled negative capacity: Capacity -100 is invalid
------ Stack Sizes -------
s1: 50 s2: 20
------ Test stack ------
Successful test: handled popping empty s1: Pop failed - stack is empty
Successful test: rejected due to type incompatibility: invalid literal for int() with base 10: 'should not be allowed into an int stack'
Failed test: expected push() to reject due to type incompatibility but it didn't
Failed test: expected push() to reject due to type incompatibility but it didn't
Failed test: expected push() to throw exception but it didn't
--------- First Stack ---------
[44]
[1000]
[10]
[99]
[123]
[44]
Successful test: handled popping empty stack s1: Pop failed - stack is empty
Successful test: handled popping empty stack s1: Pop failed - stack is empty
Successful test: handled popping empty stack s1: Pop failed - stack is empty
Successful test: handled popping empty stack s1: Pop failed - stack is empty
--------- Second Stack ---------
[T]
[4]
[4]
[4]
[4]
[w]
[i]
[a]
[s]
[-]
$$$$ test_rpn test results $$$$
"" fails to be evaluated,
--> FAIL REASON : Empty RPN expression
" " fails to be evaluated,
--> FAIL REASON : Empty RPN expression
" 1 +" fails to be evaluated,
--> FAIL REASON : Insufficient operands for operation
"1 +" fails to be evaluated,
--> FAIL REASON : Insufficient operands for operation
"1 1" fails to be evaluated,
--> FAIL REASON : Invalid RPN expression: leftover operands in stack
"1 1 fly" fails to be evaluated,
--> FAIL REASON : Invalid token: 'fly' is neither a digit nor a recognized operator
"random junk" fails to be evaluated,
--> FAIL REASON : Invalid token: 'random' is neither a digit nor a recognized operator
"f f" fails to be evaluated,
--> FAIL REASON : Invalid token: 'f' is neither a digit nor a recognized operator
"f" fails to be evaluated,
--> FAIL REASON : Invalid token: 'f' is neither a digit nor a recognized operator
"f f +" fails to be evaluated,
--> FAIL REASON : Invalid token: 'f' is neither a digit nor a recognized operator
"- * +" fails to be evaluated,
--> FAIL REASON : Insufficient operands for operation
(3) = 3
(3 4 +) = 7
"9999999 99999999 * " fails to be evaluated,
--> FAIL REASON : maximum recursion depth exceeded in comparison
(9999999999 99999999 + ) = 10099999998
(9999999999 99999999 - ) = 9900000000
"34+5+" fails to be evaluated,
--> FAIL REASON : Invalid token: '34+5+' is neither a digit nor a recognized operator
"3 4 + -" fails to be evaluated,
--> FAIL REASON : Insufficient operands for operation
"3 4 5 +" fails to be evaluated,
--> FAIL REASON : Invalid RPN expression: leftover operands in stack
(10 2 -) = 8
(1 20 -) = -19
(0 3 *) = 0
(0 3 *) = 0
(5 3 *) = 15
(-4 3 *) = -12
(-3 -5 *) = 15
(8 4 //) = 2
(8 0 //) = 0
(3 4 + 5 *) = 35
(15 7 1 1 + - // 3 * 2 1 1 + + -) = 5
----- This part is to test lost functionalities
due to use of numpy array instead of stack ----
Homogeneity Example: invalid literal for int() with base 10: 'string'
Fixed Size Example: Push failed - capacity reached