File tree Expand file tree Collapse file tree 2 files changed +0
-7
lines changed Expand file tree Collapse file tree 2 files changed +0
-7
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ int main(int argc, char* argv[]){
9
9
std::cout << " Initial test PASSED!" << std::endl;
10
10
try {
11
11
que.pop ();
12
- std::cerr << " pop() throw exception FAILED!" << std::endl;
13
12
} catch (const std::underflow_error &e){
14
13
std::cout << " pop() throw an exception PASSED! " << e.what () << std::endl;
15
14
}
@@ -22,13 +21,11 @@ int main(int argc, char* argv[]){
22
21
assert (que.size () == 0 );
23
22
try {
24
23
que.front ();
25
- std::cerr << " front() throw exception FAILED!" << std::endl;
26
24
} catch (const std::underflow_error &e){
27
25
std::cout << " front() throw an exception PASSED! " << e.what () << std::endl;
28
26
}
29
27
try {
30
28
que.back ();
31
- std::cerr << " back() throw exception FAILED!" << std::endl;
32
29
} catch (const std::underflow_error &e){
33
30
std::cout << " back() throw an exception PASSED! " << e.what () << std::endl;
34
31
}
Original file line number Diff line number Diff line change @@ -9,13 +9,11 @@ int main(int argc, char* argv[]){
9
9
assert (stk.size () == 0 );
10
10
try {
11
11
stk.pop ();
12
- std::cerr << " pop() throw an exception FAILED!" << std::endl;
13
12
} catch (const std::underflow_error &e){
14
13
std::cout << " pop() throw an exception PASSED! " << e.what () << std::endl;
15
14
}
16
15
try {
17
16
stk.top ();
18
- std::cerr << " top() throw an exception FAILED!" << std::endl;
19
17
} catch (const std::underflow_error &e){
20
18
std::cout << " top() throw an exception PASSED! " << e.what () << std::endl;
21
19
}
@@ -41,13 +39,11 @@ int main(int argc, char* argv[]){
41
39
assert (stk.size () == 0 );
42
40
try {
43
41
stk.pop ();
44
- std::cerr << " pop() throw an exception FAILED!" << std::endl;
45
42
} catch (const std::underflow_error &e){
46
43
std::cout << " pop() throw an exception PASSED! " << e.what () << std::endl;
47
44
}
48
45
try {
49
46
stk.top ();
50
- std::cerr << " top() throw an exception FAILED!" << std::endl;
51
47
} catch (const std::underflow_error &e){
52
48
std::cout << " top() throw an exception PASSED! " << e.what () << std::endl;
53
49
}
You can’t perform that action at this time.
0 commit comments