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[]){
99 std::cout << " Initial test PASSED!" << std::endl;
1010 try {
1111 que.pop ();
12- std::cerr << " pop() throw exception FAILED!" << std::endl;
1312 } catch (const std::underflow_error &e){
1413 std::cout << " pop() throw an exception PASSED! " << e.what () << std::endl;
1514 }
@@ -22,13 +21,11 @@ int main(int argc, char* argv[]){
2221 assert (que.size () == 0 );
2322 try {
2423 que.front ();
25- std::cerr << " front() throw exception FAILED!" << std::endl;
2624 } catch (const std::underflow_error &e){
2725 std::cout << " front() throw an exception PASSED! " << e.what () << std::endl;
2826 }
2927 try {
3028 que.back ();
31- std::cerr << " back() throw exception FAILED!" << std::endl;
3229 } catch (const std::underflow_error &e){
3330 std::cout << " back() throw an exception PASSED! " << e.what () << std::endl;
3431 }
Original file line number Diff line number Diff line change @@ -9,13 +9,11 @@ int main(int argc, char* argv[]){
99 assert (stk.size () == 0 );
1010 try {
1111 stk.pop ();
12- std::cerr << " pop() throw an exception FAILED!" << std::endl;
1312 } catch (const std::underflow_error &e){
1413 std::cout << " pop() throw an exception PASSED! " << e.what () << std::endl;
1514 }
1615 try {
1716 stk.top ();
18- std::cerr << " top() throw an exception FAILED!" << std::endl;
1917 } catch (const std::underflow_error &e){
2018 std::cout << " top() throw an exception PASSED! " << e.what () << std::endl;
2119 }
@@ -41,13 +39,11 @@ int main(int argc, char* argv[]){
4139 assert (stk.size () == 0 );
4240 try {
4341 stk.pop ();
44- std::cerr << " pop() throw an exception FAILED!" << std::endl;
4542 } catch (const std::underflow_error &e){
4643 std::cout << " pop() throw an exception PASSED! " << e.what () << std::endl;
4744 }
4845 try {
4946 stk.top ();
50- std::cerr << " top() throw an exception FAILED!" << std::endl;
5147 } catch (const std::underflow_error &e){
5248 std::cout << " top() throw an exception PASSED! " << e.what () << std::endl;
5349 }
You can’t perform that action at this time.
0 commit comments