library/test/text_test.cpp

28 lines
707 B
C++
Raw Normal View History

#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"));
REQUIRE(vkvm::getText() == "Hello");
REQUIRE(vkvm::clearText());
REQUIRE(vkvm::getText().empty());
}