aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2016-12-01 22:14:00 +0000
committerbloodstalker <thabogre@gmail.com>2016-12-01 22:14:00 +0000
commite1d85f5ca79482a065c1c1235af3124ee2119d7a (patch)
treec7f332010318d962c83d806e93a0fbda82c167f5 /test
parentnow used the compile command database for the misrac tdd tests (diff)
downloadmutator-e1d85f5ca79482a065c1c1235af3124ee2119d7a.tar.gz
mutator-e1d85f5ca79482a065c1c1235af3124ee2119d7a.zip
added tdd tests
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt2
-rw-r--r--test/compile_commands.json2
-rw-r--r--test/testFuncs1.c5
-rw-r--r--test/testFuncs1.h5
-rw-r--r--test/testFuncs2.c23
-rw-r--r--test/testFuncs2.h10
6 files changed, 37 insertions, 10 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 9837520..81abaad 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,3 +1,5 @@
cmake_minimum_required (VERSION 2.6)
project (tdd_test)
+set(CMAKE_C_COMPILER_ID "Clang")
+set(CMAKE_CXX_COMPILER_ID "Clang")
add_executable(tddtest main.c testFuncs1.c testFuncs2.c)
diff --git a/test/compile_commands.json b/test/compile_commands.json
index c66a5ae..6267819 100644
--- a/test/compile_commands.json
+++ b/test/compile_commands.json
@@ -14,4 +14,4 @@
"directory": "/home/bloodstalker/devi/hell2/test",
"file": "/home/bloodstalker/devi/hell2/test/testFuncs2.c"
}
-] \ No newline at end of file
+]
diff --git a/test/testFuncs1.c b/test/testFuncs1.c
index 20a40f2..e0522e8 100644
--- a/test/testFuncs1.c
+++ b/test/testFuncs1.c
@@ -4,8 +4,9 @@
/*include*/
/**********************************************************************************************************************/
#include "testFuncs1.h"
-//#include <string.h>
-
+#if 0
+#include <string.h>
+#endif
/**************************************************MACROS & DEFS*******************************************************/
/**********************************************************************************************************************/
#define LUPO 1U
diff --git a/test/testFuncs1.h b/test/testFuncs1.h
index 3e32906..ec88050 100644
--- a/test/testFuncs1.h
+++ b/test/testFuncs1.h
@@ -2,8 +2,8 @@
/*the first line's been intentionally left blank.*/
/***********************************************************************************************************/
/*defines*/
-#ifndef TESTFUNCS1_H
-#define TESTFUNCS1_H
+#ifndef _TEST1_H
+#define _TEST1_H
#define FALSE 0
#define TRUE 1
@@ -129,7 +129,6 @@ void test27(void);
void test28(void);
int test29(int a);
int test31(void);
-
#endif
/***********************************************************************************************************/
/*ive been intentionally left blank. dont touch me.*/
diff --git a/test/testFuncs2.c b/test/testFuncs2.c
index 309c280..fb30dd8 100644
--- a/test/testFuncs2.c
+++ b/test/testFuncs2.c
@@ -3,9 +3,25 @@
/*********************************************************************************************************************/
/*inclusion directives*/
#include "testFuncs2.h"
+#if 0
+#include <stdlib.h>
+#include <stdio.h>
+#include <stddef.h>
+#include <signal.h>
+#include <time.h>
+#endif
/*********************************************************************************************************************/
/*macro and definitions*/
typedef const* INTPTR;
+
+#define XMACRO Y
+
+#define ABSOLUTE(X) (((X) >= 0) ? (X) : -(X))
+#define ABSOLUTE2(X) ((X >= 0) ? X : -X)
+#define ABSOLUTE3(XMACRO) (((XMACRO) <= 0) ? (XMACRO) : -(XMACRO))
+
+#define LOCOLUPO
+#undef LOCOLUPO
/*********************************************************************************************************************/
/*Globals*/
@@ -13,6 +29,7 @@ typedef const* INTPTR;
/*functions go here.*/
static void test33(void)
{
+
short int a;
long int b;
@@ -27,6 +44,9 @@ void testfunc1(void)
b = a;
}
+#if CRAZYMACRO < 0
+#endif
+
testfunc2(void)
{
int a;
@@ -42,6 +62,9 @@ void testfunc3()
int b;
int c;
+ int abcdefghijklmnopqrstuvwxyz1234567890;
+ int abcdefghijklmnopqrstuvwxyz12345678902;
+
/*do stuff*/
}
diff --git a/test/testFuncs2.h b/test/testFuncs2.h
index 85ddeee..fa4ce13 100644
--- a/test/testFuncs2.h
+++ b/test/testFuncs2.h
@@ -2,13 +2,13 @@
/*first line intentionally left blank.*/
/*********************************************************************************************************************/
/*Defines*/
-#ifndef TESTFUNCS2_H
-#define TESTFUNCS2_H
+#ifndef _TEST2_H
+#define _TEST2_H
/*********************************************************************************************************************/
/*Globals*/
-extern int a[];
+extern int aaaa[];
-extern int b[] = {1, 2, 3, 4, 5, 6};
+extern int bbbb[] = {1, 2, 3, 4, 5, 6};
int c[2][3] = {1, 2, 3, 4, 5, 6};
@@ -17,6 +17,8 @@ int d[2][3] = {{1, 2, 3}, {4, 5, 6}};
/*funciton types go here.*/
static void test33(void);
+void testFunc1(void);
+
void testFunc4()
{
/*do shit*/