2019-12-01 19:56:35 +01:00
|
|
|
#include "../src/internal.hpp"
|
|
|
|
#include "../src/vkvm.hpp"
|
|
|
|
#include <catch2/catch.hpp>
|
|
|
|
|
|
|
|
TEST_CASE("Text") {
|
|
|
|
vkvm::initialize(0);
|
|
|
|
|
|
|
|
REQUIRE(vkvm::setText("Hello World, this is a test"));
|
|
|
|
REQUIRE(vkvm::getText() == "Hello World, this is a test");
|
|
|
|
|
|
|
|
REQUIRE(vkvm::setText("Hello World"));
|
|
|
|
REQUIRE(vkvm::getText() == "Hello World");
|
|
|
|
|
|
|
|
vkvm::setCharactersPerColumn(5);
|
|
|
|
vkvm::setCharactersPerRow(1);
|
|
|
|
|
|
|
|
REQUIRE(vkvm::clearText());
|
|
|
|
|
|
|
|
REQUIRE(vkvm::getCharactersPerColumn() == 5);
|
|
|
|
REQUIRE(vkvm::getCharactersPerRow() == 1);
|
|
|
|
|
|
|
|
REQUIRE(vkvm::setText("Hello World"));
|
2019-12-05 09:49:54 +01:00
|
|
|
REQUIRE(vkvm::getText() == "Hello");
|
|
|
|
|
|
|
|
REQUIRE(vkvm::clearText());
|
|
|
|
|
|
|
|
REQUIRE(vkvm::getText().empty());
|
2019-12-01 19:56:35 +01:00
|
|
|
}
|