feat: Works now in C17
This commit is contained in:
3
set.h
3
set.h
@@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
int fac(int n)
|
int fac(int n)
|
||||||
{
|
{
|
||||||
if (n == 1)
|
if (n <= 1)
|
||||||
return 1;
|
return 1;
|
||||||
return n * fac(n - 1);
|
return n * fac(n - 1);
|
||||||
}
|
}
|
||||||
@@ -21,8 +21,8 @@ SETUP()
|
|||||||
|
|
||||||
TEAR_DOWN()
|
TEAR_DOWN()
|
||||||
{
|
{
|
||||||
printf("Ending execution.!");
|
printf("Ending execution.");
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(Faculty_Basic)
|
TEST(Faculty_Basic)
|
||||||
|
Reference in New Issue
Block a user