aboutsummaryrefslogtreecommitdiff
path: root/kernel/kstd/print.tests.cpp
blob: 4963f46e2ac7ef92a30fd2c6131c5323102fe24f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <kstd/print>

#include <kernel/test_support/cio.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::cio::log_buffer().clear();

      kstd::println("[kernel:tests] Test Print");

      THEN("the message is appended to the log buffer")
      {
        REQUIRE(kernel::tests::cio::log_buffer().flat_messages().contains("[kernel:tests] Test Print"));
      }
    }
  }
}