Use UnitTest-Cpp library for testing

This commit is contained in:
Ilusha 2024-03-15 16:03:33 +03:00 committed by Ilya Shurupov
parent 79d018ffb4
commit b8bcf58a29
53 changed files with 1046 additions and 1383 deletions

View file

@ -1,5 +1,4 @@
#include "Buffer2D.hpp"
#include "Testing.hpp"
#include "Tests.hpp"
#include "HeapAllocator.hpp"
@ -8,18 +7,15 @@ using namespace tp;
const ualni size = 1000;
TEST_DEF_STATIC(Simple1) {
Buffer2D<int, tp::HeapAlloc> buff;
buff.reserve({ 4, 4 });
buff.set({ 2, 2 }, 5);
TEST(buff.get({ 2, 2 }) == 5);
}
SUITE(Buffer2D) {
TEST(Simple) {
Buffer2D<int, tp::HeapAlloc> buff;
buff.reserve({ 4, 4 });
buff.set({ 2, 2 }, 5);
CHECK(buff.get({ 2, 2 }) == 5);
}
TEST_DEF_STATIC(Simple2) {
// TEST(false);
}
TEST_DEF(Buffer2d) {
testSimple1();
testSimple2();
TEST(NO_TESTS) {
CHECK(false);
}
}