add test in main method

This commit is contained in:
Maximilian Keßler 2022-04-16 11:49:45 +02:00
parent da145ec194
commit aac97307e9
2 changed files with 10 additions and 1 deletions

View file

@ -1,5 +1,14 @@
#include <cstdlib>
#include <iostream>
#include <cassert>
#include "areas.h"
int main() { int main() {
srand(987192345);
std::vector<Rectangle> inst1 = get_random_instance(10,100);
Unit area = get_area_union(inst1);
std::cout << "Area is " << area << "." << std::endl;
assert(area == 6559);
return 0; return 0;
} }

View file

@ -1,7 +1,7 @@
// //
// Created by maximilian on 16.04.22. // Created by maximilian on 16.04.22.
// //
#include <assert.h> #include <cassert>
#include <bit> #include <bit>
#include "segment_tree.h" #include "segment_tree.h"