From bf1ae0fd54d2cae032c43a50d954226ef331d887 Mon Sep 17 00:00:00 2001 From: "Tim.Ebbeke" Date: Tue, 23 Jan 2024 12:11:43 +0100 Subject: [PATCH] Fixed clang format screw up. --- nui/test/nui/test_render.hpp | 56 +++++++++++------------------------- 1 file changed, 16 insertions(+), 40 deletions(-) diff --git a/nui/test/nui/test_render.hpp b/nui/test/nui/test_render.hpp index d3841ef..162fef4 100644 --- a/nui/test/nui/test_render.hpp +++ b/nui/test/nui/test_render.hpp @@ -68,8 +68,7 @@ namespace Nui::Tests using Nui::Elements::span; render(div{}(span{}("Hello World"))); ASSERT_EQ(Nui::val::global("document")["body"]["children"]["length"].as(), 1); - EXPECT_EQ(Nui::val::global("document")["body"]["children"][0]["textContent"].as(), "Hello - World"); + EXPECT_EQ(Nui::val::global("document")["body"]["children"][0]["textContent"].as(), "Hello World"); } TEST_F(TestRender, TextBodyCanBeObservedVariable) @@ -407,8 +406,7 @@ namespace Nui::Tests globalEventContext.executeActiveEventsImmediately(); EXPECT_EQ( - Nui::val::global("document")["body"]["children"][0]["attributes"]["id"].as(), "changed - again"); + Nui::val::global("document")["body"]["children"][0]["attributes"]["id"].as(), "changed again"); } TEST_F(TestRender, StableFragmentCreatesPhantomDiv) @@ -549,8 +547,7 @@ namespace Nui::Tests render(div{}(text{"Hello World"}())); ASSERT_EQ(Nui::val::global("document")["body"]["childNodes"]["length"].as(), 1); - EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][0]["nodeValue"].as(), "Hello - World"); + EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][0]["nodeValue"].as(), "Hello World"); } TEST_F(TestRender, PlainTextCanBeUpdated) @@ -562,8 +559,7 @@ namespace Nui::Tests render(div{}(text{textContent}())); ASSERT_EQ(Nui::val::global("document")["body"]["childNodes"]["length"].as(), 1); - EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][0]["nodeValue"].as(), "Hello - World"); + EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][0]["nodeValue"].as(), "Hello World"); textContent = "Changed"; globalEventContext.executeActiveEventsImmediately(); @@ -580,13 +576,11 @@ namespace Nui::Tests render(div{}(text{textContent}())); ASSERT_EQ(Nui::val::global("document")["body"]["childNodes"]["length"].as(), 1); - EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][0]["nodeValue"].as(), "Hello - World"); + EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][0]["nodeValue"].as(), "Hello World"); textContent = "Changed"; - EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][0]["nodeValue"].as(), "Hello - World"); + EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][0]["nodeValue"].as(), "Hello World"); } TEST_F(TestRender, PlainTextCanAppearAnywhereBetweenRegularElements) @@ -597,12 +591,8 @@ namespace Nui::Tests ASSERT_EQ(Nui::val::global("document")["body"]["childNodes"]["length"].as(), 3); EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][0]["tagName"].as(), "span"); - EXPECT_EQ( - Nui::val::global("document")["body"]["childNodes"][1]["nodeValue"].as(), - "Hello - World "); EXPECT_EQ(Nui::val::global(" document ")[" body "][" childNodes "][2][" tagName - "].as(), - "div"); + EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][1]["nodeValue"].as(), "Hello World"); + EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][2]["tagName"].as(), "div"); } TEST_F(TestRender, PlainTextCanBeChangedAlongsideRegularElements) @@ -615,12 +605,8 @@ namespace Nui::Tests ASSERT_EQ(Nui::val::global("document")["body"]["childNodes"]["length"].as(), 3); EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][0]["tagName"].as(), "span"); - EXPECT_EQ( - Nui::val::global("document")["body"]["childNodes"][1]["nodeValue"].as(), - "Hello - World "); EXPECT_EQ(Nui::val::global(" document ")[" body "][" childNodes "][2][" tagName - "].as(), - "div"); + EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][1]["nodeValue"].as(), "Hello World"); + EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][2]["tagName"].as(), "div"); textContent = "Changed"; globalEventContext.executeActiveEventsImmediately(); @@ -639,12 +625,8 @@ namespace Nui::Tests ASSERT_EQ(Nui::val::global("document")["body"]["childNodes"]["length"].as(), 3); EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][0]["tagName"].as(), "span"); - EXPECT_EQ( - Nui::val::global("document")["body"]["childNodes"][1]["nodeValue"].as(), - "Hello - World "); EXPECT_EQ(Nui::val::global(" document ")[" body "][" childNodes "][2][" tagName - "].as(), - "div"); + EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][1]["nodeValue"].as(), "Hello World"); + EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][2]["tagName"].as(), "div"); textContent = "Changed"; globalEventContext.executeActiveEventsImmediately(); @@ -659,8 +641,7 @@ namespace Nui::Tests render(div{}(fragment(text{"Hello World"}()))); ASSERT_EQ(Nui::val::global("document")["body"]["childNodes"]["length"].as(), 1); - EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][0]["nodeValue"].as(), "Hello - World"); + EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][0]["nodeValue"].as(), "Hello World"); } TEST_F(TestRender, PlainTextCanBeUpdatedInsideFragment) @@ -672,8 +653,7 @@ namespace Nui::Tests render(div{}(fragment(text{textContent}()))); ASSERT_EQ(Nui::val::global("document")["body"]["childNodes"]["length"].as(), 1); - EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][0]["nodeValue"].as(), "Hello - World"); + EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][0]["nodeValue"].as(), "Hello World"); textContent = "Changed"; globalEventContext.executeActiveEventsImmediately(); @@ -691,12 +671,8 @@ namespace Nui::Tests ASSERT_EQ(Nui::val::global("document")["body"]["childNodes"]["length"].as(), 3); EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][0]["tagName"].as(), "span"); - EXPECT_EQ( - Nui::val::global("document")["body"]["childNodes"][1]["nodeValue"].as(), - "Hello - World "); EXPECT_EQ(Nui::val::global(" document ")[" body "][" childNodes "][2][" tagName - "].as(), - "div"); + EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][1]["nodeValue"].as(), "Hello World"); + EXPECT_EQ(Nui::val::global("document")["body"]["childNodes"][2]["tagName"].as(), "div"); textContent = "Changed"; globalEventContext.executeActiveEventsImmediately();