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