Fawkes API Fawkes Development Version
|
Base class for unit testing with CLIPS. More...
#include <clips_test.h>
Protected Member Functions | |
virtual void | LoadCLIPSFiles (std::vector< std::string > files) |
Load the vector of CLIPS files into the environment. More... | |
bool | has_fact (const std::string &fact_set_template, const std::string &query="TRUE") |
Check if a non-ordered fact exists. More... | |
bool | has_ordered_fact (const std::string &fact_name, const std::vector< CLIPS::Value > slot_values={}) |
Check if an ordered fact exists. More... | |
virtual void | LoadCLIPSFiles (std::vector< std::string > files) |
Load the vector of CLIPS files into the environment. More... | |
bool | has_fact (const std::string &fact_set_template, const std::string &query="TRUE") |
Check if a non-ordered fact exists. More... | |
bool | has_ordered_fact (const std::string &fact_name, const std::vector< CLIPS::Value > slot_values={}) |
Check if an ordered fact exists. More... | |
Protected Attributes | |
CLIPS::Environment | env |
The default CLIPS environment used to run tests. More... | |
Base class for unit testing with CLIPS.
To define your own test setup, derive from this class.
Definition at line 35 of file clips_test.h.
|
inlineprotected |
Check if a non-ordered fact exists.
This expects the same arguments as CLIPS' any-factp.
fact_set_template | The fact set template of the query, e.g., "((?a action ?p parameters))". |
query | The constraints that must be satisfied by the fact set, e.g., "(eq ?a:param-values ?p:values)". |
Definition at line 60 of file clips_test.h.
References env.
|
inlineprotected |
Check if a non-ordered fact exists.
This expects the same arguments as CLIPS' any-factp.
fact_set_template | The fact set template of the query, e.g., "((?a action ?p parameters))". |
query | The constraints that must be satisfied by the fact set, e.g., "(eq ?a:param-values ?p:values)". |
Definition at line 60 of file clips_test.h.
References env.
|
inlineprotected |
Check if an ordered fact exists.
fact_name | The name of the fact, e.g., "foo". |
slot_values | A vector of slot values, e.g., '{ "bar" }'. |
Definition at line 71 of file clips_test.h.
|
inlineprotected |
Check if an ordered fact exists.
fact_name | The name of the fact, e.g., "foo". |
slot_values | A vector of slot values, e.g., '{ "bar" }'. |
Definition at line 71 of file clips_test.h.
|
inlineprotectedvirtual |
Load the vector of CLIPS files into the environment.
files | A vector of paths relative to the current directory. |
Definition at line 43 of file clips_test.h.
References env.
Referenced by DomainTest::SetUp(), and SimpleCLIPSTest::SetUp().
|
inlineprotectedvirtual |
Load the vector of CLIPS files into the environment.
files | A vector of paths relative to the current directory. |
Definition at line 43 of file clips_test.h.
References env.
|
protected |
The default CLIPS environment used to run tests.
Definition at line 39 of file clips_test.h.
Referenced by has_fact(), LoadCLIPSFiles(), and DomainTest::SetUp().