summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOskar <>2024-03-22 13:53:00 +0100
committerOskar <>2024-03-22 13:53:00 +0100
commit6f162676864f6972c302ecab71e44149fa039551 (patch)
treec9c33c0f219be8edaff0075c5a29d14acbd6b026 /test
parent55ac4ebe3bed9b112fa553abece277b309c76bb9 (diff)
vcpm tested, seems OK
Diffstat (limited to 'test')
-rw-r--r--test/testcases/i_validation_cases.txt31
-rw-r--r--test/validate_check_imm.c2
-rw-r--r--test/validate_check_p_m.c7
3 files changed, 39 insertions, 1 deletions
diff --git a/test/testcases/i_validation_cases.txt b/test/testcases/i_validation_cases.txt
index 81c8601..83460a2 100644
--- a/test/testcases/i_validation_cases.txt
+++ b/test/testcases/i_validation_cases.txt
@@ -1,16 +1,47 @@
validate_check_p_m
Positive input (Valid):
L+
+L-
+L-1
L+1
+L-2
L+2
+L-3
L+3
+L-9
L+9
+L-10
L+10
L+90
L+100
L+900
+Positive (_NA):
+L0
+L1
+L100
+LL
+Lasd
+L9
+L90
+L900
+
Negative (Invalid):
+L+0
+L-0
+L--
+L++
+L+L
+L-L
+L+asd
+L-asd
+L-0-
+L+0+
+L+0-
+L-0+
+L-0
+
+Overall results: Tested OK. Seems like its working like it should now.
validate_check_imm
Positive input (Valid):
diff --git a/test/validate_check_imm.c b/test/validate_check_imm.c
index b350e68..57c0cdb 100644
--- a/test/validate_check_imm.c
+++ b/test/validate_check_imm.c
@@ -22,7 +22,7 @@ int main () {
printf("?\n");
}
if(ret == _VALID) {
- printf("valid\n");
+ printf("valid plusonly\n");
}
} \ No newline at end of file
diff --git a/test/validate_check_p_m.c b/test/validate_check_p_m.c
index 8809f9a..5a4c135 100644
--- a/test/validate_check_p_m.c
+++ b/test/validate_check_p_m.c
@@ -18,6 +18,13 @@ int main () {
int ret = validate_check_p_m(smode_buf);
+ if(ret == _NA) {
+ printf("NA\n");
+ }
+ if(ret == _PLUS_CONTINUE) {
+ printf("plus continue\n");
+ }
+
if(ret == _INVALID) {
printf("?\n");
}