From 614e11f52560aaff75e7cd047b38a167fe3c0dcd Mon Sep 17 00:00:00 2001 From: Oskar <> Date: Fri, 22 Mar 2024 08:40:20 +0100 Subject: Created tests. Will create more testcases later. --- test/validate_check_imm.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 test/validate_check_imm.c (limited to 'test/validate_check_imm.c') diff --git a/test/validate_check_imm.c b/test/validate_check_imm.c new file mode 100644 index 0000000..a4d3132 --- /dev/null +++ b/test/validate_check_imm.c @@ -0,0 +1,28 @@ +#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_check_imm(smode_buf); + + if(ret == _INVALID) { + printf("?\n"); + } + if(ret == _VALID) { + printf("valid\n"); + } + +} \ No newline at end of file -- cgit v1.2.3