From 3e4dfc0b86977481bf39a0b95a15f8335ff496c1 Mon Sep 17 00:00:00 2001 From: Oskar <> Date: Fri, 22 Mar 2024 20:42:39 +0100 Subject: vimmn prepared forgot to make a branch :( --- test/validate_imm_numbers.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 test/validate_imm_numbers.c (limited to 'test/validate_imm_numbers.c') diff --git a/test/validate_imm_numbers.c b/test/validate_imm_numbers.c new file mode 100644 index 0000000..35e0e32 --- /dev/null +++ b/test/validate_imm_numbers.c @@ -0,0 +1,36 @@ +#include +#include +#include +#include +#include +#include "../7ed.h" +#include "../i_validation.h" +#include "../input.h" +#include + +// Test for validate_check_imm + +int main () { + uint64_t focus = 1; + char smode_buf[SMODE_MAX_SIZE]; // Smode buffer + fprintf(stdout, "(%lu): ", focus); // UI + fgets(smode_buf, SMODE_MAX_SIZE, stdin); // Read user input + + int ret = validate_imm_numbers(smode_buf); + + if (ret == _IMM_NUMBER) { + printf("imm number\n"); + } + if(ret == _INVALID) { + printf("?\n"); + } + if(ret == _VALID) { + printf("valid\n"); + } + if(ret == _NA) { + printf("_NA\n"); + } + + return 0; + +} \ No newline at end of file -- cgit v1.2.3