21 #include "clips_test.h"
37 env.assert_fact(
"(testfact)");
38 env.assert_fact(
"(foo bar 4.2)");
39 CLIPS::Fact::pointer fact_p = env.get_facts();
41 EXPECT_TRUE(has_fact(
"((?t testtempl))",
"(eq ?t:name foo)"));
42 EXPECT_TRUE(has_fact(
"((?f foo))",
"(eq ?f:implied (create$ bar 4.2))"));
43 EXPECT_FALSE(has_fact(
"((?t testtempl))",
"(eq ?t:name bar)"));
44 EXPECT_FALSE(has_ordered_fact(
"foo"));
45 EXPECT_TRUE(has_ordered_fact(
"foo", {
"bar", 4.2}));
Base class for unit testing with CLIPS.
virtual void LoadCLIPSFiles(std::vector< std::string > files)
Load the vector of CLIPS files into the environment.
Simple Test class that shows how to do unit testing for CLIPS.
virtual void SetUp()
Set up the test environment.