| 193 | } |
| 194 | |
| 195 | void EpMemFunctionalTests::testReadCSoarDB() |
| 196 | { |
| 197 | agent->InitSoar(); |
| 198 | |
| 199 | std::string db = SoarHelper::GetResource("epmem-csoar-db.sqlite"); |
| 200 | assertNonZeroSize_msg("No CSoar db!", db); |
| 201 | std::string pathCommand = agent->ExecuteCommandLine(std::string("epmem --set path \"" + db + "\"").c_str()); |
| 202 | std::string memoryCommand = agent->ExecuteCommandLine("epmem --set database file"); |
| 203 | std::string appendCommand = agent->ExecuteCommandLine("epmem --set append on"); |
| 204 | std::string initCommand = agent->ExecuteCommandLine("epmem --init"); |
| 205 | |
| 206 | std::string actualResult = agent->ExecuteCommandLine("epmem --print 4"); |
| 207 | |
| 208 | std::string expectedResult = std::string("========================================\n") + |
| 209 | std::string(" Episode 4 \n") + |
| 210 | std::string("========================================\n") + |
| 211 | std::string("(<id0> ^counter 2 ^io <id1> ^name Factorization ^needs-factorization true ^number-to-factor 2 ^number-to-factor-int 2 ^operator <id2> ^operator* <id2> ^reward-link <id3> ^superstate nil ^type state ^using-epmem true)\n") + |
| 212 | std::string("(<id1> ^input-link <id5> ^output-link <id4>)\n") + |
| 213 | std::string("(<id2> ^name factor-number ^number-to-factor 2)\n\n"); |
| 214 | |
| 215 | assertTrue_msg("Unexpected output from CSoar database!", actualResult == expectedResult); |
| 216 | } |
| 217 | |
| 218 | |
| 219 | void EpMemFunctionalTests::testMultiAgent() |
nothing calls this directly
no test coverage detected