Skip to content

Commit

Permalink
[Test] Fix error code
Browse files Browse the repository at this point in the history
  • Loading branch information
deunlee committed May 29, 2020
1 parent d34319a commit dca18ca
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
5 changes: 2 additions & 3 deletions UnitTest/Deque.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "CppUnitTest.h"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;

#include "../Deque/Deque.h"
#include "../Deque/Deque.cpp"

TEST_CLASS(Deque) {
Expand Down Expand Up @@ -85,8 +84,8 @@ TEST_CLASS(Deque) {
errFront = err;
}

if (errRear == Deun::DequeError::DEQUE_IS_EMPTY &&
errFront == Deun::DequeError::DEQUE_IS_EMPTY) {
if (errRear == Deun::DequeError::ELEMENT_NOT_FOUND &&
errFront == Deun::DequeError::ELEMENT_NOT_FOUND) {
return;
}

Expand Down
3 changes: 1 addition & 2 deletions UnitTest/Queue.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "CppUnitTest.h"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;

#include "../Queue/Queue.h"
#include "../Queue/Queue.cpp"

TEST_CLASS(Queue) {
Expand Down Expand Up @@ -55,7 +54,7 @@ TEST_CLASS(Queue) {
q.dequeue();
}
catch (Deun::QueueError err) {
if (err == Deun::QueueError::QUEUE_IS_EMPTY) {
if (err == Deun::QueueError::ELEMENT_NOT_FOUND) {
return;
}
}
Expand Down
3 changes: 1 addition & 2 deletions UnitTest/Stack.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "CppUnitTest.h"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;

#include "../Stack/Stack.h"
#include "../Stack/Stack.cpp"

TEST_CLASS(Stack) {
Expand Down Expand Up @@ -55,7 +54,7 @@ TEST_CLASS(Stack) {
s.pop();
}
catch (Deun::StackError err) {
if (err == Deun::StackError::STACK_IS_EMPTY) {
if (err == Deun::StackError::ELEMENT_NOT_FOUND) {
return;
}
}
Expand Down

0 comments on commit dca18ca

Please sign in to comment.