aboutsummaryrefslogtreecommitdiff
path: root/kernel/tests/src/main.cpp
blob: 69fd633cef02561956d620a5fb8deeb71e5001a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "kapi/interrupts.hpp"
#include "kapi/memory.hpp"
#include <kapi/cio.hpp>
#include <kapi/cpu.hpp>

#include <catch2/catch_session.hpp>

auto main(int argc, char ** argv) -> int
{
  kapi::cio::init();
  kapi::cpu::init();
  kapi::interrupts::enable();

  kapi::memory::init();
  // note: no kernel heap is created, since we are in the test environment. Nonetheless, we still initialize the memory
  // subsystem, so that components that rely on it can be tested. No component must ever rely on the heap allocator
  // directly, rather they have to go through the new and delete. However, some components may use the frame allocator
  // and page mapper in order to perform their tasks.

  return Catch::Session().run(argc, argv);
}