diff --git a/src/calculatorGetUserInputFactorial.c b/src/calculatorGetUserInputFactorial.c index 661e1ec..0f556e8 100644 --- a/src/calculatorGetUserInputFactorial.c +++ b/src/calculatorGetUserInputFactorial.c @@ -1,16 +1,20 @@ #include "calculatorGetUserInputFactorial.h" -int allowWhen() +// Note: +/* This Function may or may not be implemented in actual program, even if it is merged to the main branch. + If it is temporarily not included in the main Program, then this has a role in future Development of the Project */ + +int allowWhen()// int allowWhen() is helpful for indirectly unittesting void calculatorGetUserInputFactorial() { - if(q == 1) + if(utc == 1) return 1; } -void calculatorGetUserInputFactorial(int *z) +void calculatorGetUserInputFactorial(int *num) { - if(allowWhen() == 1) + if(allowWhen() == 1)//Only when int allowWhen() returns 1, void calculatorGetUserInputFactorial() will display desired Output { printf("num: "); - scanf("%d", z); + scanf("%d", num); } } diff --git a/src/calculatorGetUserInputFactorial.h b/src/calculatorGetUserInputFactorial.h index 272bb52..d8da77c 100644 --- a/src/calculatorGetUserInputFactorial.h +++ b/src/calculatorGetUserInputFactorial.h @@ -3,8 +3,8 @@ #include #include int allowWhen(); -const int q = 1; -void calculatorGetUserInputFactorial(int *z); +const int utc = 1; //ufc is unitTestConstant, which has a role in unittesting void calculatorGetUserInputFactorial() +void calculatorGetUserInputFactorial(int *num); #endif // CALCULATORGETUSERINPUTFACTORIAL_H