aboutsummaryrefslogtreecommitdiff
path: root/kernel/kstd
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-04-01 12:15:25 +0200
committerFelix Morgner <felix.morgner@ost.ch>2026-04-01 12:15:25 +0200
commit1f652b8b5ca5dbea588975466801cb1479f3dda8 (patch)
tree2852f1d7cc6d33d0cb06c66fcfcf8c03dac2a112 /kernel/kstd
parent0369fb7c4baa543dfb36ebb39ab53ac7560994ba (diff)
downloadteachos-1f652b8b5ca5dbea588975466801cb1479f3dda8.tar.xz
teachos-1f652b8b5ca5dbea588975466801cb1479f3dda8.zip
kernel/tests: dissolve tests into source tree
Diffstat (limited to 'kernel/kstd')
-rw-r--r--kernel/kstd/print.tests.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/kernel/kstd/print.tests.cpp b/kernel/kstd/print.tests.cpp
new file mode 100644
index 0000000..2ab829c
--- /dev/null
+++ b/kernel/kstd/print.tests.cpp
@@ -0,0 +1,23 @@
+#include "kstd/print"
+
+#include "kernel/tests/log_buffer.hpp"
+
+#include <catch2/catch_test_macros.hpp>
+
+SCENARIO("Kernel testing kstd shims", "[support]")
+{
+ GIVEN("the test support infrastructure is initialized")
+ {
+ WHEN("a regular print is issued")
+ {
+ kernel::tests::log_buffer::clear();
+
+ kstd::println("[kernel:tests] Test Print");
+
+ THEN("the message is appended to the log buffer")
+ {
+ REQUIRE(kernel::tests::log_buffer::flat_messages().contains("[kernel:tests] Test Print"));
+ }
+ }
+ }
+} \ No newline at end of file