forked from CorinnaKrebs/SolutionValidator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVehicleOverlappingTest.cpp
More file actions
31 lines (24 loc) · 857 Bytes
/
VehicleOverlappingTest.cpp
File metadata and controls
31 lines (24 loc) · 857 Bytes
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
#include "pch.h"
#include "CppUnitTest.h"
#include "../Validator/ConstraintsLoading.h"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
using namespace validator;
namespace LoadingConstraints
{
TEST_CLASS(VehicleOverlappingTest) {
unsigned int dim = 5;
public:
TEST_METHOD(ItemOverlappingVehicle) {
Item item(1, 1, 0, ItemType(1, dim + 1, dim, dim, 0, 0, 0));
item.setPosition(Point(0, 0, 0));
Vehicle vehicle(dim, dim, dim, 0, 0, 0, 0, 0, 0);
Assert::AreEqual(false, ConstraintsLoading::checkVehicleWalls(item, vehicle, true));
}
TEST_METHOD(ItemNotOverlapping) {
Item item(1, 1, 0, ItemType(1, dim, dim, dim, 0, 0, 0));
item.setPosition(Point(0, 0, 0));
Vehicle vehicle(dim, dim, dim, 0, 0, 0, 0, 0, 0);
Assert::AreEqual(true, ConstraintsLoading::checkVehicleWalls(item, vehicle, true));
}
};
}