15 #ifndef Om_Language_Operation_SubstituteOperation_
21 #ifndef Om_Macro_Precompilation_
23 #include "boost/test/unit_test.hpp"
33 BOOST_AUTO_TEST_SUITE(SubstituteOperationTest)
35 BOOST_AUTO_TEST_CASE(DefinitionTest) {
38 System::Get().Evaluate(
"drop find {substitute} system")
42 BOOST_AUTO_TEST_CASE(BasicSubstitutionTest) {
49 BOOST_AUTO_TEST_CASE(IdentityDefinitionTest) {
56 BOOST_AUTO_TEST_CASE(EmptyDefinitionTest) {
63 BOOST_AUTO_TEST_CASE(EmptyLexiconTest) {
70 BOOST_AUTO_TEST_CASE(EmptyKeyFallThroughTest) {
78 BOOST_AUTO_TEST_CASE(MultipleDefinitionTest) {
81 System::Get().Evaluate(
"substitute { A {{B}} A {{C}} } {A}")
86 BOOST_AUTO_TEST_CASE(MultipleEmptyKeyTest) {
89 System::Get().Evaluate(
"substitute { {{B}} {{C}} } {A}")
94 BOOST_AUTO_TEST_CASE(ChainedLookupTest) {
102 System::Get().Evaluate(
"substitute {A {B}} {unquote {A} A}")
106 "{blaven{42}}{do{blaven}}",
107 System::Get().Evaluate(
"substitute{blaven{42}}{do{blaven}}")
111 BOOST_AUTO_TEST_SUITE_END()
126 Om::Language::Operation::SubstituteOperation
130 inline char const * Type_::GetName() {
136 template <
typename TheProducer>
137 inline void Type_::Translate(
139 TheProducer & theProducer,
140 Expression & theExpression
146 theProducer.GiveElements(theScope);
#define Om_Language_Operation_SubstituteOperation_GetName_()