aboutsummaryrefslogtreecommitdiff
path: root/src/tests/test.c
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-03-23 11:32:34 -0700
committerChristian Cunningham <cc@localhost>2022-03-23 11:32:34 -0700
commit48bc61ac76b82b1514ed4bf1d3dc7ba6cb2c991c (patch)
tree6a33cbb49e2677bf0aa05658121c33dc6f9fdcf5 /src/tests/test.c
parentf6ff28ad8eb5e88a1985706bfc94657704e9c3f4 (diff)
Qualitative Testing
Diffstat (limited to 'src/tests/test.c')
-rw-r--r--src/tests/test.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/tests/test.c b/src/tests/test.c
index 0dad659..d954ade 100644
--- a/src/tests/test.c
+++ b/src/tests/test.c
@@ -431,6 +431,32 @@ void semaphore_test1(void)
sys1(SYS_SEMAPHORE_P, &test_semaphore);
// Semaphore decremented
draw_cletter(x++, y+1, 'P', 0xFF0000);
+ draw_cletter(x++, y+1, 'V', 0xFF0000);
+ sys1(SYS_SEMAPHORE_V, &test_semaphore);
+ draw_cletter(x++, y+1, 'V', 0xFF0000);
+ sys1(SYS_SEMAPHORE_V, &test_semaphore);
+ draw_cletter(x++, y+1, 'V', 0xFF0000);
+ sys1(SYS_SEMAPHORE_V, &test_semaphore);
+ // Try to decrement semaphore
+ draw_cletter(x++, y+1, 'T', 0xFF0000);
+ sys1(SYS_SEMAPHORE_P, &test_semaphore);
+ // Semaphore decremented
+ draw_cletter(x++, y+1, 'P', 0xFF0000);
+ // Try to decrement semaphore
+ draw_cletter(x++, y+1, 'T', 0xFF0000);
+ sys1(SYS_SEMAPHORE_P, &test_semaphore);
+ // Semaphore decremented
+ draw_cletter(x++, y+1, 'P', 0xFF0000);
+ // Try to decrement semaphore
+ draw_cletter(x++, y+1, 'T', 0xFF0000);
+ sys1(SYS_SEMAPHORE_P, &test_semaphore);
+ // Semaphore decremented
+ draw_cletter(x++, y+1, 'P', 0xFF0000);
+ // Try to decrement semaphore
+ draw_cletter(x++, y+1, 'T', 0xFF0000);
+ sys1(SYS_SEMAPHORE_P, &test_semaphore);
+ // Semaphore decremented
+ draw_cletter(x++, y+1, 'P', 0xFF0000);
draw_cletter(x++, y+1, 'F', 0xFF0000);
}
@@ -440,6 +466,9 @@ void semaphore_test2(void)
// Increment semaphore
draw_cletter(x++, y+2, 'V', 0xFF00);
sys1(SYS_SEMAPHORE_V, &test_semaphore);
+ // Increment semaphore
+ draw_cletter(x++, y+2, 'V', 0xFF00);
+ sys1(SYS_SEMAPHORE_V, &test_semaphore);
draw_cletter(x++, y+2, 'F', 0xFF00);
}