aboutsummaryrefslogtreecommitdiff
path: root/kernel/kstd/print.tests.cpp
blob: 8deeb1754b5860e8a708759abad116477e673c9c (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"));
      }
    }
  }
}