Skip to content

Commit

Permalink
Move SVS test to appropriate file
Browse files Browse the repository at this point in the history
Didn't see the SvsTests files when I wrote the test before.
  • Loading branch information
garfieldnate committed Sep 27, 2024
1 parent dad0d83 commit 14c2cd7
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
16 changes: 0 additions & 16 deletions UnitTests/SoarUnitTests/MiscTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,22 +378,6 @@ void MiscTests::testProductionPrinting()
no_agent_assertTrue(spMessage == "sp {foo\n (state <s> ^superstate nil)\n -->\n (<s> ^one 1 ^two 2.000000 ^three 3.000000 ^foo bar ^|| hi ^|<bar>| bar\n ^|^baz| baz ^1 one ^|2.0| two)\n}\n\n");
}

void MiscTests::testSvsSceneCaseInsensitivity()
{
agent->ExecuteCommandLine("svs --enable");
no_agent_assertTrue_msg("failed to enable SVS", agent->GetLastCommandLineResult());

std::string result;
result = agent->ExecuteCommandLine("svs S1.scene.world");
no_agent_assertFalse_msg("could not find S1 scene", result == "path not found\n");

result = agent->ExecuteCommandLine("svs s1.scene.world");
no_agent_assertFalse_msg("lower-case s1 scene name not found", result == "path not found\n");

result = agent->ExecuteCommandLine("svs D34.scene.world");
no_agent_assertTrue_msg("D34 scene name found: " + result, result == "path not found\n");
}

void MiscTests::testLocationPredictionRhs()
{
source("predict-location.soar");
Expand Down
3 changes: 0 additions & 3 deletions UnitTests/SoarUnitTests/MiscTests.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ class MiscTests : public FunctionalTestHarness
TEST(testProductionPrinting, -1)
void testProductionPrinting();

TEST(testSvsSceneCaseInsensitivity, -1)
void testSvsSceneCaseInsensitivity();

TEST(testLocationPredictionRhs, -1)
void testLocationPredictionRhs();

Expand Down
16 changes: 16 additions & 0 deletions UnitTests/SoarUnitTests/SvsTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,19 @@ void SvsTests::testSubstateWhenDisabledInSubstates()
{
// TODO
}

void SvsTests::testSvsSceneCaseInsensitivity()
{
agent->ExecuteCommandLine("svs --enable");
no_agent_assertTrue_msg("failed to enable SVS", agent->GetLastCommandLineResult());

std::string result;
result = agent->ExecuteCommandLine("svs S1.scene.world");
no_agent_assertFalse_msg("could not find S1 scene", result == "path not found\n");

result = agent->ExecuteCommandLine("svs s1.scene.world");
no_agent_assertFalse_msg("lower-case s1 scene name not found", result == "path not found\n");

result = agent->ExecuteCommandLine("svs D34.scene.world");
no_agent_assertTrue_msg("D34 scene name found: " + result, result == "path not found\n");
}
3 changes: 3 additions & 0 deletions UnitTests/SoarUnitTests/SvsTests.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ class SvsTests : public FunctionalTestHarness

TEST(testSubstateWhenDisabledInSubstates, -1);
void testSubstateWhenDisabledInSubstates();

TEST(testSvsSceneCaseInsensitivity, -1);
void testSvsSceneCaseInsensitivity();
};

#endif /* SvsTests_cpp */

0 comments on commit 14c2cd7

Please sign in to comment.