Skip to content

Commit

Permalink
Restore vegastrike.config file
Browse files Browse the repository at this point in the history
Add prints to identify crashed test
  • Loading branch information
royfalk committed Oct 10, 2024
1 parent 3eced31 commit bb704d4
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
4 changes: 3 additions & 1 deletion engine/src/configuration/tests/python_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,13 @@ TEST(Python, Config) {
std::cout << "test_path: " << test_path << std::endl;
std::cout << "lib_path: " << lib_path << std::endl;

std::cout << "Try to run GetClassFromPython." << std::endl;
PyObject* object = GetClassFromPython(
lib_path.string(),
test_path.string(),
"config", "get_config");

std::cout << "Ran GetClassFromPython successfully. Got " << object << std::endl;

Graphics2Config& cfg2 = extract<Graphics2Config&>(object);
EXPECT_EQ(cfg2.screen, 0);
EXPECT_EQ(cfg2.resolution_x, 2560);
Expand Down
32 changes: 32 additions & 0 deletions engine/src/configuration/tests/vegastrike.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<vegaconfig>
<variables>
<section name="test">
<var name="boolean_variable" value="true"/>
<var name="int_variable" value="15"/>
<var name="float_variable" value="4.2"/>
<var name="string_variable" value="hello"/>
<var name="escaped_string_variable" value="#FF0000Hello\r\nthere!#000000" />
<section name="subsection">
<var name="subsection_boolean_variable" value="true"/>
<var name="subsection_int_variable" value="15"/>
<var name="subsection_float_variable" value="4.2"/>
<var name="subsection_string_variable" value="hello"/>
<var name="subsection_escaped_string_variable" value="#FF0000Hello\r\nthere!#000000" />
</section>
</section>
<section name="test2">
<var name="boolean_variable2" value="true"/>
<var name="int_variable2" value="15"/>
<var name="float_variable2" value="4.2"/>
<var name="string_variable2" value="hello"/>
<var name="escaped_string_variable2" value="#FF0000Hello\r\nthere!#000000" />
<section name="subsection2">
<var name="subsection_boolean_variable2" value="true"/>
<var name="subsection_int_variable2" value="15"/>
<var name="subsection_float_variable2" value="4.2"/>
<var name="subsection_string_variable2" value="hello"/>
<var name="subsection_escaped_string_variable2" value="#FF0000Hello\r\nthere!#000000" />
</section>
</section>
</variables>
</vegaconfig>

0 comments on commit bb704d4

Please sign in to comment.