Browse Source

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

Michael Ragazzon 3 years ago
parent
commit
d56f17e49c
1 changed files with 12 additions and 0 deletions
  1. 12 0
      Tests/Source/UnitTests/ElementDocument.cpp

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

@@ -274,4 +274,16 @@ TEST_CASE("Load")
 	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();