Exploring raycasters and possibly make a little "doom like" game based on it.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#include "lel.hpp"
|
|
|
|
#include <catch2/catch_test_macros.hpp>
|
|
|
|
#include <fmt/core.h>
|
|
|
|
#include <string>
|
|
|
|
#include "ansi_parser.hpp"
|
|
|
|
#include <codecvt>
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
TEST_CASE("test basic ops", "[lel]") {
|
|
|
|
LELParser parser(0, 0, 500, 500);
|
|
|
|
|
|
|
|
bool good = parser.parse(
|
|
|
|
"[ label_1 | *label3 ]"
|
|
|
|
"[ (300,300)text1 | (150)people ]"
|
|
|
|
"[ >label2 | _ ]"
|
|
|
|
"[ message | buttons ]");
|
|
|
|
|
|
|
|
REQUIRE(good);
|
|
|
|
|
|
|
|
REQUIRE(parser.row_count == 4);
|
|
|
|
REQUIRE(parser.max_columns == 2);
|
|
|
|
REQUIRE(parser.cells.size() == 8);
|
|
|
|
REQUIRE(parser.cells.at("label2").left == false);
|
|
|
|
REQUIRE(parser.cells.at("label3").expand == true);
|
|
|
|
REQUIRE(parser.cells.at("people").expand == false);
|
|
|
|
REQUIRE(parser.cells.at("message").expand == false);
|
|
|
|
}
|