From 1fba8fcaaf42ea5b3f45d2afa4a6a9bb9c20ffb8 Mon Sep 17 00:00:00 2001 From: AntoinePrv Date: Fri, 27 Jan 2023 11:10:44 +0100 Subject: [PATCH] Add test for overriden checkbox.style --- test/test_xwidgets.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/test_xwidgets.cpp b/test/test_xwidgets.cpp index 0eb0507..82ab5a3 100644 --- a/test/test_xwidgets.cpp +++ b/test/test_xwidgets.cpp @@ -77,6 +77,20 @@ namespace xw REQUIRE_EQ(true, c.indent()); } + TEST_CASE("checkbox.style") + { + checkbox c; + c.style = checkbox_style::initialize() // + .background("black") + .description_width("3") + .finalize(); + REQUIRE_EQ("black", c.style().background()); + REQUIRE_EQ("3", c.style().description_width()); + + c.style().description_width = "50"; + REQUIRE_EQ("50", c.style().description_width()); + } + TEST_CASE("html") { html h;