#include <boost/algorithm/string/replace.hpp>
#include "knowrob/Logger.h"
#include "knowrob/terms/ListTerm.h"
#include "knowrob/terms/OptionList.h"
#include "knowrob/reasoner/prolog/PrologTests.h"
#include "knowrob/integration/prolog/PrologBackend.h"
#include "knowrob/queries/QueryParser.h"
Go to the source code of this file.
|
| TEST_F (PrologReasonerTests, simple_conjunction) |
|
| TEST_F (PrologReasonerTests, semweb) |
|
◆ EXPECT_NO_SOLUTION
#define EXPECT_NO_SOLUTION |
( |
|
phi | ) |
EXPECT_EQ(lookupAll(phi).size(),0) |
◆ EXPECT_ONLY_SOLUTION
#define EXPECT_ONLY_SOLUTION |
( |
|
phi, |
|
|
|
sol |
|
) |
| |
Value: { \
auto sols = lookup(phi); \
EXPECT_EQ(sols.size(),1); \
if(sols.size()==1) { EXPECT_EQ(*sols[0], sol); } }
Definition at line 122 of file PrologTests.cpp.
◆ TEST_F() [1/2]
TEST_F |
( |
PrologReasonerTests |
, |
|
|
semweb |
|
|
) |
| |
◆ TEST_F() [2/2]
TEST_F |
( |
PrologReasonerTests |
, |
|
|
simple_conjunction |
|
|
) |
| |
Definition at line 129 of file PrologTests.cpp.
130 auto p1 = QueryParser::parsePredicate(
"atom_concat(a,b,AB)");
131 auto p2 = QueryParser::parsePredicate(
"atom_concat(AB,c,ABC)");
132 auto queryFormula = std::make_shared<SimpleConjunction>(std::vector<FirstOrderLiteralPtr>{
133 std::make_shared<FirstOrderLiteral>(p1,
false),
134 std::make_shared<FirstOrderLiteral>(p2,
false)
141 {std::make_shared<Variable>(
"AB"), Atom::Tabled(
"ab")},
142 {std::make_shared<Variable>(
"ABC"), Atom::Tabled(
"abc")}
#define EXPECT_ONLY_SOLUTION(phi, sol)