#include "gate/tests.hpp"
#include "gate/system/terminals.hpp"
#include "gate/wrappers.hpp"
using namespace gate;
using namespace gate::sys;
static void runTerminalTests(Terminal& term)
{
Terminal::ColorEnum bgcol = Terminal::Color_Black;<--- Variable 'bgcol' is reassigned a value before the old one has been used.
Terminal::ColorEnum txtcol = Terminal::Color_White;<--- Variable 'txtcol' is reassigned a value before the old one has been used.
//uint16_t x = 0, y = 0;
GATEXX_TEST_CHECK_NOTHROW(bgcol = term.getBackColor());<--- Variable 'bgcol' is reassigned a value before the old one has been used.
GATEXX_TEST_CHECK_NOTHROW(txtcol = term.getTextColor());<--- Variable 'txtcol' is reassigned a value before the old one has been used.
//GATEXX_TEST_CHECK_NOTHROW(term.getCursorPos(x, y));
//GATEXX_TEST_CHECK_NOTHROW(term.setCursorPos(x, y));
GATEXX_TEST_CHECK_NOTHROW(term.setBackColor(bgcol));
GATEXX_TEST_CHECK_NOTHROW(term.setTextColor(txtcol));
GATEXX_TEST_CHECK_NOTHROW(term.println("Hello current console terminal!"));
}
GATEXX_TEST_UNIT(TerminalConsole)
{
Terminal term = Terminal::getConsole();
runTerminalTests(term);
}
GATEXX_TEST_UNIT(TerminalNewConsole)
{
Terminal term = Terminal::openConsole();
runTerminalTests(term);
}