Initial cut of the lel parser mostly working but none of the basic alignment properties work.
This commit is contained in:
parent
e7e0df6b70
commit
846b7aaf16
7 changed files with 492 additions and 354 deletions
|
@ -6,16 +6,22 @@
|
|||
#include <codecvt>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
|
||||
TEST_CASE("test basic ops", "[lel]") {
|
||||
LELParser parser;
|
||||
LELParser parser(0, 0, 500, 500);
|
||||
|
||||
bool good = parser.parse(
|
||||
"[ label_1 | label3 ]"
|
||||
"[ (300,300)*text1 | (150)people ]"
|
||||
"[ <label2 | _ ]"
|
||||
"[ 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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue