mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-01 17:30:52 +01:00
Add Catch2 and Google Test on Cmake
ToDo: - Add compiling QElectroTech on Cmake (help needed) - more Tests? - Qt Test - Boost Test to test run qtcreator File > open => CMakeLists.txt
This commit is contained in:
22
tests/catch/tst_My_test.cpp
Normal file
22
tests/catch/tst_My_test.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "../../sources/borderproperties.h"
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
TEST_CASE("My first test with Catch2", "[fancy]") { REQUIRE(0 == 0); }
|
||||
|
||||
TEST_CASE("BorderProperties")
|
||||
{
|
||||
int var = 5;
|
||||
BorderProperties My;
|
||||
My.columns_count = var;
|
||||
My.columns_header_height = var;
|
||||
|
||||
CHECK(My.columns_count - 1 == var); // test zal falen maar test de vogende
|
||||
CHECK(
|
||||
My.columns_header_height - 1
|
||||
== var); // test zal falen maar test de vogende
|
||||
REQUIRE(0 == 0);
|
||||
REQUIRE(1 == 0); // test zal falen en stopt
|
||||
REQUIRE(0 == 0); // not testit
|
||||
REQUIRE(1 == 0); // not testit
|
||||
}
|
||||
Reference in New Issue
Block a user