better main
This commit is contained in:
parent
cdfaeb668d
commit
9bc33b22e9
1 changed files with 12 additions and 1 deletions
13
main.cpp
13
main.cpp
|
@ -6,8 +6,19 @@
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
srand(987192345);
|
srand(987192345);
|
||||||
|
|
||||||
|
std::vector<Rectangle> rects;
|
||||||
|
rects.push_back({{0,0},{10,10},0,0});
|
||||||
|
Unit area = get_area_union(rects);
|
||||||
|
assert(area == 10);
|
||||||
|
|
||||||
|
rects.push_back({{2,3},{4,12},0,0});
|
||||||
|
area = get_area_union(rects);
|
||||||
|
std::cout << "Area is " << area << std::endl;
|
||||||
|
assert(area == 14);
|
||||||
|
|
||||||
std::vector<Rectangle> inst1 = get_random_instance(10,100);
|
std::vector<Rectangle> inst1 = get_random_instance(10,100);
|
||||||
Unit area = get_area_union(inst1);
|
area = get_area_union(inst1);
|
||||||
std::cout << "Area is " << area << "." << std::endl;
|
std::cout << "Area is " << area << "." << std::endl;
|
||||||
assert(area == 6559);
|
assert(area == 6559);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue