reorganizing the repository

This commit is contained in:
2023-11-24 09:40:52 +01:00
parent 3430407a93
commit b49fc4801f
68 changed files with 17 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
gcc -o x1 eg1.c -I../include_ytest/include/ -L.. -lytest $1
+43
View File
@@ -0,0 +1,43 @@
#include "ftest/ftest.h"
TEST(foo){
PRINTF("first test\n");
int a=1;
EXPECT_TRUE(1==a);
}
TEST(foo){ /* same name*/
sleep(2);
float a=0.001, b=0.0005;
PRINTF("after sleeping 2 seconds, we test if %f ?= 2*%f\n",a,b);
EXPECT_EQ_TYPE_FLOAT(a,2*b);
}
TEST(foo){
sleep(1);
double a=0.001, b=0.0001;
LOG("after 1 sec, \n");
EXPECT_LT_TYPE_DOUBLE(b,a);
ASSERT_GE_TYPE_DOUBLE(a,b);
ASSERT_LE_TYPE_DOUBLE(a,b);
LOG("this line will not print");
}
TEST(){
EXPECT_TRUE(2==1);
LOG("this line will print: the precedent expect failed\n");
}
TEST(){
sleep(1);
EXPECT_FALSE(2==1);
}
TEST(an_other_test){
LOG("FINAL, no test, only sleep\n");
sleep(2);
}
int main(int argc, char **argv){
run_all_tests_args(argc,argv);
return 0;
}
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash
if [ "$#" -le 0 ] ; then
echo "usage : $0 <option>"
echo "for example: $0 \"-p=3 -r\""
fi
LD_LIBRARY_PATH=.. ./x1 $1
Binary file not shown.