2
0
Эх сурвалжийг харах

Add unit test for ReloadStyleSheet, we should no longer have any warnings

Michael Ragazzon 3 жил өмнө
parent
commit
d56f17e49c

+ 12 - 0
Tests/Source/UnitTests/ElementDocument.cpp

@@ -274,4 +274,16 @@ TEST_CASE("Load")
 	TestsShell::ShutdownShell();
 	TestsShell::ShutdownShell();
 }
 }
 
 
+TEST_CASE("ReloadStyleSheet")
+{
+	Context* context = TestsShell::GetContext();
+	ElementDocument* document = context->LoadDocument("basic/demo/data/demo.rml");
+
+	// There should be no warnings when reloading style sheets.
+	document->ReloadStyleSheet();
+
+	document->Close();
+	TestsShell::ShutdownShell();
+}
+
 TEST_SUITE_END();
 TEST_SUITE_END();