diff options
| author | bloodstalker <thabogre@gmail.com> | 2016-11-26 03:48:58 +0000 | 
|---|---|---|
| committer | bloodstalker <thabogre@gmail.com> | 2016-11-26 03:48:58 +0000 | 
| commit | d23103dfc9105e0bd3c66bd446f8ecaa116675bd (patch) | |
| tree | 7b2211dfd77d7b8f442eedab44b365e6ec8defd8 | |
| parent | added 14.6,14.7 and 14.8 (diff) | |
| download | mutator-d23103dfc9105e0bd3c66bd446f8ecaa116675bd.tar.gz mutator-d23103dfc9105e0bd3c66bd446f8ecaa116675bd.zip | |
added tdd tests for 14.6,14.7,14.8
| -rw-r--r-- | test/main.c | 1 | ||||
| -rw-r--r-- | test/testFuncs1.c | 82 | ||||
| -rw-r--r-- | test/testFuncs1.h | 1 | 
3 files changed, 84 insertions, 0 deletions
| diff --git a/test/main.c b/test/main.c index 83798b5..1984e6e 100644 --- a/test/main.c +++ b/test/main.c @@ -75,5 +75,6 @@ main()  	test27();  	test28();  	test29(a); +	test31();  }  /*intentionally left blank.*/ diff --git a/test/testFuncs1.c b/test/testFuncs1.c index b70b3cd..4f606a2 100644 --- a/test/testFuncs1.c +++ b/test/testFuncs1.c @@ -1039,5 +1039,87 @@ loco:  	return a;
  }
 +void test30(void)
 +{
 +	int a;
 +	int b;
 +	int c;
 +
 +	for (a = 0; a < 10; ++a)
 +	{
 +		a++;
 +
 +		if (a == 5)
 +			break;
 +		if (a == 6)
 +			break;
 +	}
 +
 +	for (a = 0; a < 10; a++)
 +	{
 +		a++;
 +		if (a == 6)
 +			break;
 +	}
 +
 +	while (a < 10)
 +	{
 +		if (b == 1)
 +			break;
 +		if (c == 1)
 +			break;
 +	}
 +
 +	do {
 +		if (a == 5)
 +			break;
 +		if (b == 6)
 +			break;
 +		if (c == 10)
 +			break;
 +	} while (a < 10);
 +
 +	for (a = 0; a < 100; a++)
 +	{
 +		for (b = 0; b < 100; b++)
 +		{
 +			c++;
 +			if (a == 1)
 +				break;
 +		}
 +		for (c = 0; c < 100; c++)
 +		{
 +			b++;
 +			if (a == 10)
 +				break;
 +		}
 +	}
 +
 +	for (a = 0; a < 100; a++)
 +	{
 +		if (a == 1)
 +			break;
 +
 +		while (a < 10)
 +		{
 +			b++;
 +			if (c == 10)
 +				break;
 +		}
 +	}
 +}
 +
 +int test31(void)
 +{
 +	int a;
 +
 +	if (a == 1)
 +		return 2;
 +	else if (a == 2)
 +		return 3;
 +	else
 +		return 1;
 +}
 +
  /**********************************************************************************************************************/
  /*the last line's been intentionally left blank.*/
 diff --git a/test/testFuncs1.h b/test/testFuncs1.h index 4d6827e..0915b12 100644 --- a/test/testFuncs1.h +++ b/test/testFuncs1.h @@ -125,6 +125,7 @@ void test26(void);  void test27(void);
  void test28(void);
  int test29(int a);
 +int test31(void);
  /***********************************************************************************************************/
  /*ive been intentionally left blank. dont touch me.*/
 | 
